mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
Merge pull request #542 in FS/freeswitch from ~SSINYAGIN/freeswitch:bugfix/FS-7910-systemd-service-ignores-etc-default-freeswitch to master
* commit 'b2bcc8b2dd449cbe30bdfc5428e36171762cbd3e': FS-8194 FS-7910 FS-7937 systemd service improvements
This commit is contained in:
commit
42ef181e7c
10
debian/bootstrap.sh
vendored
10
debian/bootstrap.sh
vendored
@ -1324,8 +1324,14 @@ for x in postinst postrm preinst prerm; do
|
|||||||
cp -a freeswitch.$x freeswitch-all.$x
|
cp -a freeswitch.$x freeswitch-all.$x
|
||||||
done
|
done
|
||||||
cp -a freeswitch-doc.docs freeswitch-all.docs
|
cp -a freeswitch-doc.docs freeswitch-all.docs
|
||||||
#cp -a freeswitch-systemd.freeswitch.service freeswitch-all.freeswitch.service
|
|
||||||
cp -a freeswitch-sysvinit.freeswitch.default freeswitch-all.freeswitch.default
|
cp -a freeswitch-systemd.freeswitch.service freeswitch-all.freeswitch.service
|
||||||
|
cp -a freeswitch-systemd.freeswitch.tmpfile freeswitch-all.freeswitch.tmpfile
|
||||||
|
cp -a freeswitch-systemd.freeswitch.default freeswitch-all.freeswitch.default
|
||||||
|
|
||||||
|
cp -a freeswitch-systemd.freeswitch.default freeswitch-sysvinit.freeswitch.default
|
||||||
|
|
||||||
|
# TODO: FS-7928 need to add a condition and skip this for jessie and onward
|
||||||
cp -a freeswitch-sysvinit.freeswitch.init freeswitch-all.freeswitch.init
|
cp -a freeswitch-sysvinit.freeswitch.init freeswitch-all.freeswitch.init
|
||||||
|
|
||||||
echo "Generating additional lintian overrides..." >&2
|
echo "Generating additional lintian overrides..." >&2
|
||||||
|
32
debian/freeswitch-systemd.freeswitch.service
vendored
32
debian/freeswitch-systemd.freeswitch.service
vendored
@ -8,14 +8,14 @@ After=syslog.target network.target local-fs.target
|
|||||||
; service
|
; service
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/run/freeswitch/freeswitch.pid
|
PIDFile=/run/freeswitch/freeswitch.pid
|
||||||
ExecStart=/usr/bin/freeswitch -ncwait -nonat
|
Environment="DAEMON_OPTS=-nonat"
|
||||||
|
EnvironmentFile=-/etc/default/freeswitch
|
||||||
|
ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait ${DAEMON_OPTS}
|
||||||
TimeoutSec=45s
|
TimeoutSec=45s
|
||||||
Restart=always
|
Restart=always
|
||||||
; exec
|
; exec
|
||||||
RuntimeDirectory=freeswitch
|
User=root
|
||||||
RuntimeDirectoryMode=0755
|
Group=daemon
|
||||||
User=freeswitch
|
|
||||||
Group=freeswitch
|
|
||||||
LimitCORE=infinity
|
LimitCORE=infinity
|
||||||
LimitNOFILE=100000
|
LimitNOFILE=100000
|
||||||
LimitNPROC=60000
|
LimitNPROC=60000
|
||||||
@ -28,5 +28,27 @@ CPUSchedulingPolicy=rr
|
|||||||
CPUSchedulingPriority=89
|
CPUSchedulingPriority=89
|
||||||
UMask=0007
|
UMask=0007
|
||||||
|
|
||||||
|
; alternatives which you can enforce by placing a unit drop-in into
|
||||||
|
; /etc/systemd/system/freeswitch.service.d/*.conf:
|
||||||
|
;
|
||||||
|
; User=freeswitch
|
||||||
|
; Group=freeswitch
|
||||||
|
; ExecStart=
|
||||||
|
; ExecStart=/usr/bin/freeswitch -ncwait -nonat -rp
|
||||||
|
;
|
||||||
|
; empty ExecStart is required to flush the list.
|
||||||
|
;
|
||||||
|
; if your filesystem supports extended attributes, execute
|
||||||
|
; setcap 'cap_net_bind_service,cap_sys_nice=+ep' /usr/bin/freeswitch
|
||||||
|
; this will also allow socket binding on low ports
|
||||||
|
;
|
||||||
|
; otherwise, remove the -rp option from ExecStart and
|
||||||
|
; add these lines to give real-time priority to the process:
|
||||||
|
;
|
||||||
|
; PermissionsStartOnly=true
|
||||||
|
; ExecStartPost=/bin/chrt -f -p 1 $MAINPID
|
||||||
|
;
|
||||||
|
; execute "systemctl daemon-reload" after editing the unit files.
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
1
debian/freeswitch-systemd.freeswitch.tmpfile
vendored
Normal file
1
debian/freeswitch-systemd.freeswitch.tmpfile
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
d /var/run/freeswitch 0755 freeswitch freeswitch - -
|
1
debian/freeswitch-systemd.install
vendored
1
debian/freeswitch-systemd.install
vendored
@ -1 +0,0 @@
|
|||||||
/lib/systemd/system/freeswitch.service
|
|
3
debian/freeswitch.postinst
vendored
3
debian/freeswitch.postinst
vendored
@ -37,6 +37,9 @@ case "$1" in
|
|||||||
mkdir -p /etc/freeswitch/tls/
|
mkdir -p /etc/freeswitch/tls/
|
||||||
chown freeswitch:freeswitch /etc/freeswitch/tls
|
chown freeswitch:freeswitch /etc/freeswitch/tls
|
||||||
fi
|
fi
|
||||||
|
if [ -x /bin/systemctl -a x`systemctl is-enabled freeswitch` != "xenabled" ]; then
|
||||||
|
systemctl enable freeswitch
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
;;
|
;;
|
||||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -98,12 +98,11 @@ override_dh_strip:
|
|||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
dh_auto_install
|
dh_auto_install
|
||||||
dh_auto_install -- -C libs/esl pymod-install
|
dh_auto_install -- -C libs/esl pymod-install
|
||||||
mkdir -p debian/tmp/lib/systemd/system
|
|
||||||
install -m0644 debian/freeswitch-systemd.freeswitch.service debian/tmp/lib/systemd/system/freeswitch.service
|
|
||||||
rm -f debian/tmp/usr/share/freeswitch/grammar/model/communicator/COPYING
|
rm -f debian/tmp/usr/share/freeswitch/grammar/model/communicator/COPYING
|
||||||
|
|
||||||
override_dh_installinit:
|
override_dh_installinit:
|
||||||
dh_installinit -pfreeswitch-sysvinit --name=freeswitch
|
dh_installinit -pfreeswitch-sysvinit --name=freeswitch
|
||||||
|
dh_installinit -pfreeswitch-systemd --name=freeswitch
|
||||||
dh_installinit -pfreeswitch-all --name=freeswitch
|
dh_installinit -pfreeswitch-all --name=freeswitch
|
||||||
|
|
||||||
override_dh_makeshlibs:
|
override_dh_makeshlibs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user