[SR-Users] Running Kamailio 4.3 on Debian 8.1 and systemd

Grant Bagdasarian gb at cm.nl
Mon Aug 10 12:46:04 CEST 2015


Hello,

I just installed the latest stable release of Kamailio (I believe 4.3.1) on a debian 8.1 system using the install guide (http://www.kamailio.org/wiki/install/4.3.x/git).

Starting kamailio didn't work using /etc/init.d/kamailio start.
I got the following error:
# /etc/init.d/kamailio start
[....] Starting kamailio (via systemctl): kamailio.serviceFailed to start kamailio.service: Unit kamailio.service failed to load: No such file or directory.
failed!

After some googling I found out I have to add a new file named kamailio.service to the /etc/systemd/system/ directory.

Kamailio.service:
[Unit]
Description=Kamailio SIP Server

[Service]
Type=forking
PIDFile=/var/run/kamailio.pid
ExecStart=/usr/local/sbin/kamctl start
ExecRestart=/usr/local/sbin/kamctl restart
ExecStop=/usr/local/sbin/kamctl stop

[Install]
WantedBy=multi-user.target

Now I can start kamailio using the command: service kamailio start

Is this the correct way of doing this? Does the file need any changes?

Regards,

Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150810/5621e67b/attachment.html>


More information about the sr-users mailing list