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