From: Travis Cross Date: Tue, 22 Sep 2015 04:23:20 +0000 (+0000) Subject: Use systemd RuntimeDirectory for /run/freeswitch X-Git-Tag: v1.4.23~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aca2c714d04f843803b5bd79d7115e02da15163;p=thirdparty%2Ffreeswitch.git Use systemd RuntimeDirectory for /run/freeswitch This changes how we create the temporary directory /run/freeswitch when starting FS with systemd. The /run directory starts empty after a system reboot, so we need to ensure this directory is present. As part of systemd.exec(5), systemd provides a mechanism to automatically manage these directories under /run and to bind their lifetime to the lifetime of the process. This commit moves to using the RuntimeDirectory= mechanism and removes the obsolete ExecStartPre/mkdir code. FS-7130 --- diff --git a/debian/freeswitch-systemd.freeswitch.service b/debian/freeswitch-systemd.freeswitch.service index c96f1c2b3f..688af6a5ae 100644 --- a/debian/freeswitch-systemd.freeswitch.service +++ b/debian/freeswitch-systemd.freeswitch.service @@ -9,12 +9,12 @@ After=syslog.target network.target local-fs.target Type=forking PIDFile=/run/freeswitch/freeswitch.pid PermissionsStartOnly=true -ExecStartPre=/bin/mkdir -p /run/freeswitch -ExecStartPre=/bin/chown freeswitch:freeswitch /run/freeswitch ExecStart=/usr/bin/freeswitch -ncwait -nonat TimeoutSec=45s Restart=always ; exec +RuntimeDirectory=freeswitch +RuntimeDirectoryMode=0755 WorkingDirectory=/run/freeswitch User=freeswitch Group=freeswitch