mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-03 20:01:57 +00:00
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
This commit is contained in:
parent
cd4ebc67c4
commit
0aca2c714d
4
debian/freeswitch-systemd.freeswitch.service
vendored
4
debian/freeswitch-systemd.freeswitch.service
vendored
@ -9,12 +9,12 @@ After=syslog.target network.target local-fs.target
|
|||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/run/freeswitch/freeswitch.pid
|
PIDFile=/run/freeswitch/freeswitch.pid
|
||||||
PermissionsStartOnly=true
|
PermissionsStartOnly=true
|
||||||
ExecStartPre=/bin/mkdir -p /run/freeswitch
|
|
||||||
ExecStartPre=/bin/chown freeswitch:freeswitch /run/freeswitch
|
|
||||||
ExecStart=/usr/bin/freeswitch -ncwait -nonat
|
ExecStart=/usr/bin/freeswitch -ncwait -nonat
|
||||||
TimeoutSec=45s
|
TimeoutSec=45s
|
||||||
Restart=always
|
Restart=always
|
||||||
; exec
|
; exec
|
||||||
|
RuntimeDirectory=freeswitch
|
||||||
|
RuntimeDirectoryMode=0755
|
||||||
WorkingDirectory=/run/freeswitch
|
WorkingDirectory=/run/freeswitch
|
||||||
User=freeswitch
|
User=freeswitch
|
||||||
Group=freeswitch
|
Group=freeswitch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user