File: init.d

package info (click to toggle)
gcpegg 5.1-14
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 324 kB
  • ctags: 439
  • sloc: ansic: 3,726; makefile: 97; sh: 33; csh: 21
file content (49 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/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

cd /var/spool/gcpegg

case "$1" in
  start)
	echo -n "Starting GCP EGG software on virtual terminal 8: eggsh"
	openvt -f -c 8 /usr/sbin/eggsh
	echo "."
	;;
  stop)
	echo -n "Stopping GCP EGG software: eggsh"
	start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/eggsh
	echo "."
	;;
  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 /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|purge}"
        exit 1
	;;
esac

exit 0