summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/x11vnc/files/x11vnc-init
diff options
context:
space:
mode:
authorSebastian Schmelzer2010-09-02 17:50:49 +0200
committerSebastian Schmelzer2010-09-02 17:50:49 +0200
commit416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 (patch)
tree4715f7d742fec50931017f38fe6ff0a89d4ceccc /os-plugins/plugins/x11vnc/files/x11vnc-init
parentFix for the problem reported on the list (sed filter forgotten for the (diff)
downloadcore-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.gz
core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.xz
core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.zip
change dir structure
Diffstat (limited to 'os-plugins/plugins/x11vnc/files/x11vnc-init')
-rwxr-xr-xos-plugins/plugins/x11vnc/files/x11vnc-init83
1 files changed, 0 insertions, 83 deletions
diff --git a/os-plugins/plugins/x11vnc/files/x11vnc-init b/os-plugins/plugins/x11vnc/files/x11vnc-init
deleted file mode 100755
index 548b2114..00000000
--- a/os-plugins/plugins/x11vnc/files/x11vnc-init
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-# --------------------------------
-# /etc/init.d/x11vnc
-# --------------------------------
-
-if [ -f /etc/x11vnc/x11vnc.conf ]
-then
- . /etc/x11vnc/x11vnc.conf
-fi
-
-# find xauthority file
-find_xauth () {
- FOUND=0
- RETRIES=4
- [ -z "$1" ] || RETRIES="$1"
-
- [ -e "/var/lib/kdm/" ] &&
- XAUTHFILE_KDM=`find /var/lib/kdm/ -iname "A\:0-*"`
- [ -e "/var/run/xauth/" ] &&
- XAUTHFILE_KDM2=`find /var/run/xauth/ -iname "A\:0-*"`
- [ -e "/var/lib/xdm/authdir/authfiles/" ] &&
- XAUTHFILE_XDM=`find /var/lib/xdm/authdir/authfiles/ -iname "A\:0-*"`
- [ -e "/var/lib/gdm/" ] &&
- XAUTHFILE_GDM=`find /var/lib/gdm/ -iname *Xauth*`
-
- [ -f "$XAUTHFILE_KDM" ] && FOUND=1 && XAUTHORITY="$XAUTHFILE_KDM"
- [ -f "$XAUTHFILE_KDM2" ] && FOUND=1 && XAUTHORITY="$XAUTHFILE_KDM2"
- [ -f "$XAUTHFILE_XDM" ] && FOUND=1 && XAUTHORITY="$XAUTHFILE_XDM"
- [ -f "$XAUTHFILE_GDM" ] && FOUND=1 && XAUTHORITY="$XAUTHFILE_GDM"
-
- if [ "$FOUND" -eq "0" ]; then
- if [ "$RETRIES" -gt "0" ]; then
- let "RETRIES-=1"
- find_xauth "$RETRIES"
- else
- echo "start FAILED (can't find way to authenticate myself against X)" >>/var/log/x11vnc.debug
- exit -1
- fi
- else
- echo "found authfile ($XAUTHORITY)" >>/var/log/x11vnc.debug
- fi
-}
-
-START_COMMAND="x11vnc"
-
-case "$1" in
- start)
-
- if [ ! -f /etc/x11vnc/passwd ]; then
- echo " start FAILED (/etc/x11vnc/passwd not found)" >>/var/log/x11vnc.debug
- echo " Create it manualy and retry starting x11vnc" >>/var/log/x11vnc.debug
- exit -1;
- fi
-
- #su -c "$COMMAND" -l x11vnc &
- if [ $X11VNC_X11 = 1 ]; then
- find_xauth
- START_COMMAND="$START_COMMAND -auth $XAUTHORITY $X11VNC_PARAMS"
- else
- START_COMMAND="$START_COMMAND $X11VNC_PARAMS"
- fi
- OUTPUT=`$START_COMMAND`
- echo "$START_COMMAND" >>/var/log/x11vnc.debug
- echo "$OUTPUT" >>/var/log/x11vnc.debug
- ;;
- stop)
- pid=`pidof x11vnc`
- if [ -z "$pid" ]
- then
- echo "x11vnc not running" >>/var/log/x11vnc.debug
- exit -1;
- else
- kill -9 $pid
- echo "x11vnc stopped" >>/var/log/x11vnc.debug
- fi
-
- ;;
- *)
- echo "x11vnc startscript"
- echo "Usage: $0 (start|stop)"
- ;;
-esac
-exit 0