X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=experiments%2Fvnc%2Finit.d%2Fvncserver.001;fp=experiments%2Fvnc%2Finit.d%2Fvncserver.001;h=2b6e6dd27d6e850fe259921bfaa6963804828b22;hb=52fa1f567127cd47e446c68deb29a6d6fe20ce82;hp=0000000000000000000000000000000000000000;hpb=e1127a793a9bfe64df1b3a5209c86bb66505fe28;p=feisty_meow.git diff --git a/experiments/vnc/init.d/vncserver.001 b/experiments/vnc/init.d/vncserver.001 new file mode 100755 index 00000000..2b6e6dd2 --- /dev/null +++ b/experiments/vnc/init.d/vncserver.001 @@ -0,0 +1,27 @@ +#!/bin/bash +PATH="$PATH:/usr/bin/" +export USER="fred" +DISPLAY="1" +DEPTH="16" +GEOMETRY="1024x768" +OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" +. /lib/lsb/init-functions + +case "$1" in +start) +log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}" +su ${USER} -c "/usr/bin/vncserver ${OPTIONS}" +;; + +stop) +log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}" +su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" +;; + +restart) +$0 stop +$0 start +;; +esac +exit 0 +