-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinit
More file actions
executable file
·53 lines (46 loc) · 998 Bytes
/
Copy pathinit
File metadata and controls
executable file
·53 lines (46 loc) · 998 Bytes
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
#!/bin/sh
#
# chkconfig: 345 99 01
# description: Starts the tartarus application
#
### BEGIN INIT INFO
# Provides: tartarus
# Required-Start: $local_fs $network $remote_fs $time
# Required-Stop: $local_fs $network $remote_fs $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop tartarus
### END INIT INFO
. /etc/tartarus/config
killproc() { # kill the named process(es)
pid=`/bin/ps -e |
/bin/grep -w $1 |
/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && kill $pid
}
# Start/stop processes required for Erlang
# (pretty primitive at the moment)
start() {
echo "Starting tartarus"
su - $TARTARUS_USER -c "/etc/tartarus/start" &
}
stop() {
echo "Stopping tartarus"
su - $TARTARUS_USER -c "/etc/tartarus/stop"
#killproc beam
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
*)
echo "Usage: $0 { start | stop | restart }"
;;
esac