summaryrefslogtreecommitdiffstats
path: root/testing/kamailio/kamailio.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/kamailio/kamailio.initd')
-rw-r--r--testing/kamailio/kamailio.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/kamailio/kamailio.initd b/testing/kamailio/kamailio.initd
new file mode 100644
index 00000000..aaea95b3
--- /dev/null
+++ b/testing/kamailio/kamailio.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+
+daemon=/usr/sbin/kamailio
+pidfile=/var/run/kamailio/kamailio.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Kamailio"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
+ -- \
+ -u ${KAMAILIO_USER:-opensips} \
+ -g ${KAMAILIO_GROUP:-opensips} \
+ -P $pidfile
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Kamailio"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}