X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Finit.d;h=14d86146cc87ab5b40940f2666afd71650e61c20;hb=fe9a15c4d35eb463d71dfa3bd712fa16a261e567;hp=74dc49f7472bad682cd7878cbed26d2966cd99fc;hpb=491009ffbaedc312f1588681d2af08cd394a99de;p=debian%2Fgcpegg diff --git a/debian/init.d b/debian/init.d index 74dc49f..14d8614 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,7 +1,18 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: gcpegg +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start GCP EGG software on virtual terminal 8 +### END INIT INFO + set -e +. /lib/lsb/init-functions + test -x /usr/sbin/eggsh || exit 0 test -d /var/spool/gcpegg || exit 0 @@ -10,7 +21,7 @@ cd /var/spool/gcpegg case "$1" in start) echo -n "Starting GCP EGG software on virtual terminal 8: eggsh" - openvt -f -c 8 eggsh + openvt /usr/sbin/eggsh echo "." ;; stop) @@ -21,11 +32,16 @@ case "$1" in reload|force-reload|restart) echo -n "Restarting GCP EGG software on virtual terminal 8..." start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/eggsh - openvt -f -c 8 eggsh + openvt /usr/sbin/eggsh echo "done." ;; + purge) + echo -n "Purging all previously generated data by GCP EGG" + rm -r /var/spool/gcpegg/* + echo "done." + ;; *) - echo "Usage: /etc/init.d/gcpegg {start|stop|reload|force-reload|restart}" + echo "Usage: /etc/init.d/gcpegg {start|stop|reload|force-reload|restart|purge}" exit 1 ;; esac