blob: e0b371c792ea9886496302508ca92a86c119f6f5 (
plain)
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
|
#!/sbin/runscript
# Copyright 2013 Alpine Linux
# Distributed under the terms of the GNU General Public License v2
extra_stopped_commands="setup"
depend() {
use net
need localmount
}
setup() {
ebegin "Setting up ${SVCNAME}"
cd /var/lib/atheme-iris
python ./clean.py
python ./compile.py
echo "atheme-iris has been compiled succesfully."
echo "Now you can start the daemon with /etc/init.d/atheme-iris start"
eend $?
}
start() {
ebegin "Starting ${SVCNAME}"
if [ -f /var/lib/atheme-iris/.compiled ]; then
cd ${SVCHOME}
nohup python ./run.py ${ARGS} &>/dev/null &
else
eerror "You must first run /etc/init.d/atheme-iris setup"
fi
setup()
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
if [ -f /var/run/atheme-iris/atheme-iris.pid ]; then
kill $(cat /var/run/atheme-iris/atheme-iris.pid)
else
eerror "atheme-iris is not running."
fi
eend $?
}
|