permission mods
[feisty_meow.git] / experiments / vnc / init.d / vncserver.003
1 #!/bin/bash
2 PATH="$PATH:/usr/bin/"
3 export USER="fred"
4 DISPLAY="1"
5 DEPTH="16"
6 GEOMETRY="1200x800"
7 OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
8 . /lib/lsb/init-functions
9
10 case "$1" in
11 start)
12 log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
13 su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
14 ;;
15
16 stop)
17 log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
18 su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
19 ;;
20
21 restart)
22 $0 stop
23 $0 start
24 ;;
25 esac
26 exit 0
27