mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-12 23:40:04 +00:00
Move chown of /etc/freeswitch/tls to postinst
Doing a chown of something in /etc/ as part of a systemd service file is totally broken. It's far too large a sledgehammer to point at /etc here. Someone may legitimately not be using /etc/freeswitch/tls in his configuration, in which case this chown would fail and cause FS to fail to start. Or someone may legitimately need /etc/freeswitch/tls to have different ownership, in which case we would clobber it here. The right thing to do is to create this directory in the postinst (which we already are, assuming there is not an existing configuration) and then perform the chown of it at the same time. FS-7697
This commit is contained in:
parent
12e90ce989
commit
16d0538fb5
2
debian/freeswitch-systemd.freeswitch.service
vendored
2
debian/freeswitch-systemd.freeswitch.service
vendored
@ -8,8 +8,6 @@ After=syslog.target network.target local-fs.target
|
||||
; service
|
||||
Type=forking
|
||||
PIDFile=/run/freeswitch/freeswitch.pid
|
||||
PermissionsStartOnly=true
|
||||
ExecStartPre=/bin/chown freeswitch:freeswitch /etc/freeswitch/tls
|
||||
ExecStart=/usr/bin/freeswitch -ncwait -nonat
|
||||
TimeoutSec=45s
|
||||
Restart=always
|
||||
|
1
debian/freeswitch.postinst
vendored
1
debian/freeswitch.postinst
vendored
@ -31,6 +31,7 @@ case "$1" in
|
||||
done
|
||||
if [ ! -d "/etc/freeswitch" ]; then
|
||||
mkdir -p /etc/freeswitch/tls/
|
||||
chown freeswitch:freeswitch /etc/freeswitch/tls
|
||||
cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
|
||||
fi
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user