forked from kamailio/kamailio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/kamailio/obs: added systemd template to start multiple kamailio s…
…ervices GH#3904
- Loading branch information
1 parent
11df362
commit b4ec854
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[Unit] | ||
Description=Kamailio - the Open Source SIP Server (instance %i) | ||
Documentation=man:kamailio(8) | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
User=kamailio | ||
Group=kamailio | ||
Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' | ||
Environment='SHM_MEMORY=64' | ||
Environment='PKG_MEMORY=8' | ||
EnvironmentFile=-/etc/sysconfig/kamailio-%i | ||
EnvironmentFile=-/etc/sysconfig/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 -DD -P /run/kamailio-%i/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -Y /run/kamailio-%i | ||
Restart=on-failure | ||
# necessary for chown of control files e.g. for jsonrpcs and ctl modules | ||
AmbientCapabilities=CAP_CHOWN | ||
# /run/kamailio in tmpfs | ||
RuntimeDirectory=kamailio-%i | ||
RuntimeDirectoryMode=0770 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |