Module: kamailio Branch: master Commit: a8cb23903b271a1b78456fed5da8e10474aee405 URL: https://github.com/kamailio/kamailio/commit/a8cb23903b271a1b78456fed5da8e104...
Author: Xenofon Karamanos 22965395+xkaraman@users.noreply.github.com Committer: Xenofon Karamanos 22965395+xkaraman@users.noreply.github.com Date: 2024-07-25T11:11:36+03:00
pkg: Add systemd template for starting multiple kamailio services
---
Added: pkg/kamailio/deb/debian/kamailio@.service
---
Diff: https://github.com/kamailio/kamailio/commit/a8cb23903b271a1b78456fed5da8e104... Patch: https://github.com/kamailio/kamailio/commit/a8cb23903b271a1b78456fed5da8e104...
---
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