summaryrefslogtreecommitdiffstats
path: root/unstable/kamailio/kamailio.initd
diff options
context:
space:
mode:
Diffstat (limited to 'unstable/kamailio/kamailio.initd')
-rw-r--r--unstable/kamailio/kamailio.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/unstable/kamailio/kamailio.initd b/unstable/kamailio/kamailio.initd
new file mode 100644
index 00000000000..aaea95b3ee9
--- /dev/null
+++ b/unstable/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 $?
+}