Skip to content

Commit

Permalink
Debian: add systemd unit file.
Browse files Browse the repository at this point in the history
This unit file supports the configuration check before restart and
retains the P_MEMORY and S_MEMORY variable usage.

Since both the systemd configuration and the init script take care of
creating /var/run/opensips, the opensips.dirs file has been removed.
  • Loading branch information
nud authored and razvancrainea committed Sep 11, 2015
1 parent 185c15d commit ee9dfb5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packaging/debian/changelog
@@ -1,4 +1,14 @@
opensips (2.0.0-1) unstable; urgency=low
opensips (2.1.0-2) stable; urgency=low

* Modify init script to use LSB functions.
* Update dependencies for Jessie.
* Remove mysql-client dependency on opensips-modules-mysql.
* Add systemd unit file.

-- Steve Frécinaux <sfrecinaux@beip.be> Wed, 29 Jul 2015 14:57:06 +0200


opensips (2.1.0) stable; urgency=low

* Major Public Release.

Expand Down
19 changes: 19 additions & 0 deletions packaging/debian/opensips.service
@@ -0,0 +1,19 @@
[Unit]
Description=OpenSIPS SIP Server
After=network.target mysqld.service postgresql.service rtpproxy.service

[Service]
Type=forking
User=opensips
Group=opensips
Environment=P_MEMORY=32 S_MEMORY=32
EnvironmentFile=-/etc/default/opensips
PIDFile=/var/run/opensips/opensips.pid
ExecStart=/usr/sbin/opensips -P /var/run/opensips/opensips.pid -f /etc/opensips/opensips.cfg -m $S_MEMORY -M $P_MEMORY $OPTIONS
ExecStartPre=/usr/sbin/opensips -c -f /etc/opensips/opensips.cfg
Restart=always
TimeoutStopSec=30s

[Install]
WantedBy=multi-user.target

1 change: 1 addition & 0 deletions packaging/debian/opensips.tmpfile
@@ -0,0 +1 @@
d /run/opensips 0775 opensips opensips -

0 comments on commit ee9dfb5

Please sign in to comment.