forked from OpenSIPS/opensips
-
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: add opensips_b2bua unit-file and default file
- Loading branch information
Showing
2 changed files
with
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# OpenSIPS startup options | ||
# | ||
|
||
# Set to yes to enable opensips, once configured properly. | ||
RUN_OPENSIPS=no | ||
|
||
# User to run as | ||
USER=opensips | ||
|
||
# Group to run as | ||
GROUP=opensips | ||
|
||
# Amount of shared memory to allocate for the running OpenSIPS server (in Mb) | ||
S_MEMORY=256 | ||
|
||
# Amount of pkg memory to allocate for the running OpenSIPS server (in Mb) | ||
P_MEMORY=128 | ||
|
||
# Enable the server to leave a core file when it crashes. | ||
# Set this to 'yes' to enable OpenSIPS to leave a core file when it crashes | ||
# or 'no' to disable this feature. This option is case sensitive and only | ||
# accepts 'yes' and 'no' and only in lowercase letters. | ||
# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify | ||
# a directory for the core files to get a dump. Look into the opensips | ||
# init file for an example configuration. | ||
DUMP_CORE=no | ||
|
||
# Any additional OpenSIPS options | ||
OPTIONS="" |
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,23 @@ | ||
[Unit] | ||
Description=OpenSIPS is a very fast and flexible SIP (RFC3261) server | ||
Documentation=man:opensips | ||
After=network.target mysqld.service postgresql.service rtpproxy.service | ||
|
||
[Service] | ||
Type=forking | ||
User=opensips | ||
Group=opensips | ||
RuntimeDirectory=opensips_b2bua | ||
RuntimeDirectoryMode=775 | ||
Environment=P_MEMORY=128 S_MEMORY=256 | ||
EnvironmentFile=-/etc/default/opensips_b2bua | ||
PermissionsStartOnly=yes | ||
PIDFile=%t/opensips_b2bua/opensips.pid | ||
ExecStart=/usr/sbin/opensips -P %t/opensips_b2bua/opensips.pid -f /etc/opensips/b2bua/opensips.cfg -m $S_MEMORY -M $P_MEMORY $OPTIONS | ||
ExecStop=/usr/bin/pkill --pidfile %t/opensips_b2bua/opensips.pid | ||
Restart=always | ||
TimeoutStopSec=30s | ||
LimitNOFILE=262144 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |