-
Notifications
You must be signed in to change notification settings - Fork 5
/
init-d
executable file
·48 lines (44 loc) · 870 Bytes
/
init-d
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
#! /bin/sh
### BEGIN INIT INFO
# Provides: grun
# Required-Start: $network $named $remote_fs $syslog
# Required-Stop: $network $named $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
### CENTOS
# chkconfig: - 99 40
# description: grun startup script
###
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/bin/grun
OPTS=
NAME=grun
DESC="grun Daemon"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
$DAEMON -d $OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$DAEMON -d -k $OPTS
echo "$NAME."
;;
reload)
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0