Created
September 30, 2012 17:42
-
-
Save dweeber/3807857 to your computer and use it in GitHub Desktop.
Init.d script for tightvnc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: tightvncserver | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: start vnc server | |
# Description: | |
### END INIT INFO | |
. /lib/lsb/init-functions | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
su root -c 'vncserver :1 -geometry 1280x800 -depth 24' | |
echo "Starting VNC server " | |
;; | |
stop) | |
pkill Xtightvnc | |
echo "VNC Server has been stopped (didn't double check though)" | |
;; | |
*) | |
echo "Usage: /etc/init.d/tightvnc {start|stop}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment