Module: kamailio
Branch: 5.8
Commit: 183c4d1168f10d73e16ba605f202077128dbbb95
URL:
https://github.com/kamailio/kamailio/commit/183c4d1168f10d73e16ba605f202077…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2025-01-09T19:51:11+01:00
pkg: Add systemd template for starting multiple kamailio services
(cherry picked from commit a8cb23903b271a1b78456fed5da8e10474aee405)
---
Added: pkg/kamailio/deb/debian/kamailio@.service
---
Diff:
https://github.com/kamailio/kamailio/commit/183c4d1168f10d73e16ba605f202077…
Patch:
https://github.com/kamailio/kamailio/commit/183c4d1168f10d73e16ba605f202077…
---
diff --git a/pkg/kamailio/deb/debian/kamailio@.service
b/pkg/kamailio/deb/debian/kamailio@.service
new file mode 100644
index 00000000000..81c06394d17
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio@.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=Kamailio - the Open Source SIP Server (instance %i)
+Documentation=man:kamailio(8)
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+User=kamailio
+Group=kamailio
+Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg'
+Environment='SHM_MEMORY=64'
+Environment='PKG_MEMORY=8'
+EnvironmentFile=-/etc/default/kamailio-%i
+EnvironmentFile=-/etc/default/kamailio-%i.d/*
+# PIDFile requires a full absolute path
+PIDFile=/run/kamailio-%i/kamailio.pid
+# ExecStart requires a full absolute path
+ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f
$CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
+Restart=on-failure
+# /run/kamailio in tmpfs
+RuntimeDirectory=kamailio-%i
+RuntimeDirectoryMode=0770
+
+[Install]
+WantedBy=multi-user.target