-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_script
More file actions
executable file
·54 lines (44 loc) · 1.06 KB
/
init_script
File metadata and controls
executable file
·54 lines (44 loc) · 1.06 KB
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
50
51
52
53
54
#! /bin/sh
### BEGIN INIT INFO
# Provides: acpm_www
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of acpm_www
# Description: starts instance of acpm_www using start-stop-daemon
### END INIT INFO
APP_PATH=/opt/acpm_www/script/a_c_p_m_www
DAEMON=/usr/local/bin/hypnotoad
DAEMON_CONF=/opt/acpm_www/hypnotoad.conf
DAEMON_OPTS="--config ${DAEMON_CONF} ${APP_PATH}"
DESC="acpm_www Server";
PID_FILE=/var/run/acpm_www.pid
test -x $DAEMON || exit 0
set -e
start() {
echo "Starting ${DESC}: ";
start-stop-daemon -q --start --pidfile ${PID_FILE} --exec ${DAEMON} -- ${DAEMON_OPTS};
}
stop() {
echo "Stopping $DESC: ";
start-stop-daemon -q --stop --signal QUIT --pidfile ${PID_FILE};
}
case "$1" in
start)
start;
;;
stop)
stop
;;
restart|force-reload)
stop;
sleep 1
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0