diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-12 11:40:48 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-12 11:40:48 +0000 |
commit | 58183010cf058940694e49d95367513301449e60 (patch) | |
tree | 26f5dede5cdf23b550a8f1b630794d656edbf826 /testing/opensips/opensips.initd | |
parent | 09b207e0f11e4e8c0bbb6ecf40a12d747d8579f3 (diff) | |
download | aports-58183010cf058940694e49d95367513301449e60.tar.bz2 aports-58183010cf058940694e49d95367513301449e60.tar.xz |
testing/opensips: added init.d and pre/post install scripts
Diffstat (limited to 'testing/opensips/opensips.initd')
-rw-r--r-- | testing/opensips/opensips.initd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/opensips/opensips.initd b/testing/opensips/opensips.initd new file mode 100644 index 0000000000..5805908f05 --- /dev/null +++ b/testing/opensips/opensips.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +daemon=/usr/sbin/opensips +pidfile=/var/run/opensips/opensips.pid + +depend() { + need net +} + +start() { + ebegin "Starting OpenSIPS" + start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ + -- \ + -u ${OPENSIPS_USER:-opensips} \ + -g ${OPENSIPS_GROUP:-opensips} \ + -P $pidfile + eend $? +} + +stop() { + ebegin "Stopping OpenSIPS" + start-stop-daemon --stop --quiet --pidfile $pidfile + eend $? +} + |