Merge pull request #359 from micmac1/fs-sigkill-openwrt-18.06
freeswitch-stable: add SIGKILL to init script
This commit is contained in:
commit
7fbb94503f
2 changed files with 11 additions and 2 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
PRG_NAME:=freeswitch
|
PRG_NAME:=freeswitch
|
||||||
PKG_NAME:=$(PRG_NAME)-stable
|
PKG_NAME:=$(PRG_NAME)-stable
|
||||||
PKG_VERSION:=1.6.20
|
PKG_VERSION:=1.6.20
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=9
|
||||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||||
|
|
||||||
PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2017 OpenWrt.org
|
# Copyright (C) 2017 - 2018 OpenWrt.org
|
||||||
|
|
||||||
START=90
|
START=90
|
||||||
|
|
||||||
|
@ -123,6 +123,15 @@ stop_service() {
|
||||||
timeout=$(($timeout-10))
|
timeout=$(($timeout-10))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ $retval -ne 1 ] && {
|
||||||
|
$LOGGER Application seems to hang
|
||||||
|
$LOGGER Sending SIGKILL
|
||||||
|
kill -SIGKILL $mypid 2>/dev/null
|
||||||
|
sleep 3
|
||||||
|
pgrep $FS | grep -w $mypid &>/dev/null
|
||||||
|
retval=$?
|
||||||
|
}
|
||||||
|
|
||||||
[ $retval -ne 1 ] && {
|
[ $retval -ne 1 ] && {
|
||||||
$LOGGER Failed to stop $FS
|
$LOGGER Failed to stop $FS
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue