net/freeswitch: Fixed restart so that it waits for FS to terminated before attempting to start a new instance
git-svn-id: svn://svn.openwrt.org/openwrt/packages@21964 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
63291377f1
commit
79fe47a70b
@ -181,7 +181,8 @@ $(call Package/freeswitch/Default)
|
|||||||
+freeswitch-mod-tone-stream \
|
+freeswitch-mod-tone-stream \
|
||||||
+freeswitch-mod-voipcodecs \
|
+freeswitch-mod-voipcodecs \
|
||||||
+freeswitch-mod-xml-curl \
|
+freeswitch-mod-xml-curl \
|
||||||
+freeswitch-mod-xml-rpc
|
+freeswitch-mod-xml-rpc \
|
||||||
|
+freeswitch-tools
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# mod_lua is included in FreeSWITCH minimal because it is intended to be used
|
# mod_lua is included in FreeSWITCH minimal because it is intended to be used
|
||||||
@ -195,12 +196,14 @@ $(call Package/freeswitch/Default)
|
|||||||
+freeswitch-mod-console \
|
+freeswitch-mod-console \
|
||||||
+freeswitch-mod-dialplan-xml \
|
+freeswitch-mod-dialplan-xml \
|
||||||
+freeswitch-mod-dptools \
|
+freeswitch-mod-dptools \
|
||||||
|
+freeswitch-mod-event-socket \
|
||||||
+freeswitch-mod-local-stream \
|
+freeswitch-mod-local-stream \
|
||||||
+freeswitch-mod-sndfile \
|
+freeswitch-mod-sndfile \
|
||||||
+freeswitch-mod-sofia \
|
+freeswitch-mod-sofia \
|
||||||
+freeswitch-mod-tone-stream \
|
+freeswitch-mod-tone-stream \
|
||||||
+freeswitch-mod-voipcodecs \
|
+freeswitch-mod-voipcodecs \
|
||||||
+freeswitch-mod-lua
|
+freeswitch-mod-lua \
|
||||||
|
+freeswitch-tools
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/freeswitch-sounds-en
|
define Package/freeswitch-sounds-en
|
||||||
|
@ -22,3 +22,16 @@ stop() {
|
|||||||
[ -f $DEFAULT ] && . $DEFAULT
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$FS_DIR/usr/bin/freeswitch $OPTIONS -stop
|
$FS_DIR/usr/bin/freeswitch $OPTIONS -stop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
# stopping freeswitch is non-blocking, so we wait until freeswitch's
|
||||||
|
# event socket is down, and then wait an additional ten seconds so that
|
||||||
|
# freeswitch should be completely shutdown before we start it again
|
||||||
|
local retval
|
||||||
|
stop
|
||||||
|
fs_cli -x status >/dev/null 2>&1
|
||||||
|
retval=$?
|
||||||
|
while [ $retval -eq 0 ]; do sleep 1; fs_cli -x status >/dev/null 2>&1; retval=$?; done
|
||||||
|
sleep 10
|
||||||
|
start
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user