diff options
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 $? +} + |