X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Finit.d;h=6e9a55ae15f25bcd7686195772f3f1f469c85f65;hb=27d1c24a83176ac8a19588319341e513abf88b48;hp=74dc49f7472bad682cd7878cbed26d2966cd99fc;hpb=491009ffbaedc312f1588681d2af08cd394a99de;p=debian%2Fgcpegg diff --git a/debian/init.d b/debian/init.d index 74dc49f..6e9a55a 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,5 +1,14 @@ #!/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 test -x /usr/sbin/eggsh || exit 0 @@ -10,7 +19,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 -f -c 8 /usr/sbin/eggsh echo "." ;; stop) @@ -21,11 +30,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 -f -c 8 /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