diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-26 13:00:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-26 13:13:58 +0000 |
commit | e7604ea2ccc65d83e89be57314112c2c4662d9bd (patch) | |
tree | a5a0f1e7bf8e689c2da455bcf0153789dced5ac8 /main/atheme-iris/atheme-iris.initd | |
parent | 6c9c1be49d60d503b0da39ab0fa0a5b5325d524c (diff) | |
download | aports-e7604ea2ccc65d83e89be57314112c2c4662d9bd.tar.bz2 aports-e7604ea2ccc65d83e89be57314112c2c4662d9bd.tar.xz |
main/atheme-iris: moved from testing
Diffstat (limited to 'main/atheme-iris/atheme-iris.initd')
-rwxr-xr-x | main/atheme-iris/atheme-iris.initd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/atheme-iris/atheme-iris.initd b/main/atheme-iris/atheme-iris.initd new file mode 100755 index 0000000000..4ac1708463 --- /dev/null +++ b/main/atheme-iris/atheme-iris.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 2013 Alpine Linux +# Distributed under the terms of the GNU General Public License v2 + +extra_stopped_commands="compile" + +: ${SVCHOME:=/var/lib/$SVCNAME} +: ${pidfile:=/var/run/${SVCNAME%%.*}/${SVCNAME#*.}.pid} + +depend() { + use net + need localmount +} +compile() { + ebegin "Compiling configuration for ${SVCNAME}" + cd ${SVCHOME} + ./clean.py + ./compile.py + eend $? +} + +start() { + compile || return 1 + checkpath --directory --owner iris ${pidfile%/*} + ebegin "Starting ${SVCNAME}" + start-stop-daemon --exec ${SVCHOME}/run.py \ + --pidfile $pidfile \ + --chdir $SVCHOME \ + --user iris:iris \ + --background \ + --stdout /dev/null \ + --stderr /dev/null \ + --wait 500 \ + -- \ + -P $pidfile \ + $ARGS + + eend $? +} |