aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opensips/opensips.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-12 11:40:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-12 11:40:48 +0000
commit58183010cf058940694e49d95367513301449e60 (patch)
tree26f5dede5cdf23b550a8f1b630794d656edbf826 /testing/opensips/opensips.initd
parent09b207e0f11e4e8c0bbb6ecf40a12d747d8579f3 (diff)
downloadaports-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.initd25
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 $?
+}
+