blob: 97b60489d3e1412bfcfb03bacb0122f52ecbac5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
post_install() {
if [ -f $MYTHHOME/.fluxbox/apps ] ; then
if [ -n `/bin/grep x11vnc $MYTHHOME/.fluxbox/apps` ] ; then
echo ""
echo "==> Adding x11vnc to user mythtv's ~/.fluxbox/apps"
echo ""
# Add x11vnc to ~/mythtv/.fluxbox/apps before LinHES-run
sed -i '/LinHES-run/ i [startup] {x11vnc -nap -wait 50 -passwd mythtv -display :0 -forever -o ~/.vnc/x11vnc.log -bg}' $MYTHHOME/.fluxbox/apps
else
echo ""
echo "==> x11vnc startup line already present in user"
echo "==> mythtv's ~/.fluxbox/apps"
echo ""
fi
fi
}
pre_remove() {
# kill x11vnc
PID=`pidof -o %PPID /usr/bin/x11vnc`
[ -n "$PID" ] && kill $PID
# Remove line in .fluxbox/apps
if [ -f $MYTHHOME/.fluxbox/apps ] ; then
sed -i '/x11vnc/d' $MYTHHOME/.fluxbox/apps
fi
}
|