3 # gdm: Starts the VNC server
5 # Version: @(#) /etc/rc.d/init.d/x11vncd 0.1
8 # description: Starts and stops the VNC server
10 # config: /etc/sysconfig/x11vncd
12 . /etc/rc.d/init.d/functions
15 # See how we were called.
18 # Check if the service is already running?
19 if [ ! -f /var/lock/subsys/x11vncd ]; then
20 msg_starting "VNC Server"
21 daemon --fork /usr/sbin/x11vncd
23 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/x11vncd
25 msg_already_running "VNC Server"
29 if [ -f /var/lock/subsys/x11vncd ]; then
30 msg_stopping "VNC Server"
32 msg_stopping "x11vnc process"
34 rm -f /var/lock/subsys/x11vncd
36 msg_not_running "VNC Server"
50 msg_usage "$0 {start|stop|restart|force-reload|status}"