[go: up one dir, main page]

Menu

[r1]: / vncspyd  Maximize  Restore  History

Download this file

49 lines (43 with data), 724 Bytes

#!/bin/sh
#
#	/etc/rc.d/init.d/vncspyd
#
# Starts the vncspy daemon
#
# chkconfig: 345 44 56
# description: Listen for VNC keystrokes
# processname: vncspyd

. /lib/lsb/init-functions

start () {
    # For chosing eth1, use: /sbin/vncspy eth1 >> /var/log/vncspy &
    /sbin/vncspy >> /var/log/vncspy &
    status=$?
    if [ $status -ne 0 ]; then
        exit $status
    fi
}

stop () {
    local pid
    pid=`ps -A | egrep 'vncspy' | awk '{print $1; exit 0}'`
    if [ "$pid" != "" ]; then
	kill $pid
    fi
}

case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        stop
        start
    ;;
    reload|force-reload)
    ;;
    *)
    	echo "Usage: $0 {start}"
    ;;
esac

exit 0