summaryrefslogtreecommitdiffstats
path: root/abs/extra/x11vnc/x11vnc.install
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2011-08-09 19:39:56 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2011-08-09 19:39:56 (GMT)
commitd0f8e88086dcbe2c05331f36cff037b0c675c7c4 (patch)
treed43a936bbd3d3b928d5e75d21aff1af7173c4ad0 /abs/extra/x11vnc/x11vnc.install
parent9ca212980fe906fe0614cdb55fc6edecd974d295 (diff)
downloadlinhes_pkgbuild-d0f8e88086dcbe2c05331f36cff037b0c675c7c4.zip
linhes_pkgbuild-d0f8e88086dcbe2c05331f36cff037b0c675c7c4.tar.gz
linhes_pkgbuild-d0f8e88086dcbe2c05331f36cff037b0c675c7c4.tar.bz2
x11vnc: add install file that adds/removes line in .fluxbox/apps Ref #780
Diffstat (limited to 'abs/extra/x11vnc/x11vnc.install')
-rw-r--r--abs/extra/x11vnc/x11vnc.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/abs/extra/x11vnc/x11vnc.install b/abs/extra/x11vnc/x11vnc.install
new file mode 100644
index 0000000..63af505
--- /dev/null
+++ b/abs/extra/x11vnc/x11vnc.install
@@ -0,0 +1,26 @@
+post_install() {
+ if [ -f /home/mythtv/.fluxbox/apps ] ; then
+ if [ -n `/bin/grep x11vnc /home/mythtv/.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}' /home/mythtv/.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 /home/mythtv/.fluxbox/apps ] ; then
+ sed -i '/x11vnc/d' /home/mythtv/.fluxbox/apps
+ fi
+}