X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Finit.d;h=b04ffb0cc6998ac6ba8680e822a8305499b1b43b;hb=52d5b75ea4006eb294f6406f10ef4c09dd0b9987;hp=3c38511746ceeb906b7f4be3bd040c90aea27857;hpb=d946a30d5eabd2dd3b5574fc818bb1740e5827bf;p=debian%2Fgcpegg diff --git a/debian/init.d b/debian/init.d index 3c38511..b04ffb0 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,8 +1,17 @@ #!/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 -f /usr/sbin/eggsh || exit 0 +test -x /usr/sbin/eggsh || exit 0 test -d /var/spool/gcpegg || exit 0 cd /var/spool/gcpegg @@ -10,7 +19,7 @@ cd /var/spool/gcpegg case "$1" in start) echo -n "Starting GCP EGG software on virtual terminal 8: eggsh" - openvt -c 8 eggsh + /usr/bin/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 -c 8 eggsh + /usr/bin/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