Changeset 21964


Ignore:
Timestamp:
2010-06-27T15:36:24+02:00 (7 years ago)
Author:
cshore
Message:

net/freeswitch: Fixed restart so that it waits for FS to terminated before attempting to start a new instance

Location:
packages/net/freeswitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/freeswitch/Makefile

    r21963 r21964  
    182182                +freeswitch-mod-voipcodecs \ 
    183183                +freeswitch-mod-xml-curl \ 
    184                 +freeswitch-mod-xml-rpc 
     184                +freeswitch-mod-xml-rpc \ 
     185                +freeswitch-tools 
    185186endef 
    186187 
     
    196197                +freeswitch-mod-dialplan-xml \ 
    197198                +freeswitch-mod-dptools \ 
     199                +freeswitch-mod-event-socket \ 
    198200                +freeswitch-mod-local-stream \ 
    199201                +freeswitch-mod-sndfile \ 
     
    201203                +freeswitch-mod-tone-stream \ 
    202204                +freeswitch-mod-voipcodecs \ 
    203                 +freeswitch-mod-lua 
     205                +freeswitch-mod-lua \ 
     206                +freeswitch-tools 
    204207endef 
    205208 
  • packages/net/freeswitch/files/freeswitch.init

    r21811 r21964  
    2323        $FS_DIR/usr/bin/freeswitch $OPTIONS -stop 
    2424} 
     25 
     26restart() { 
     27        # stopping freeswitch is non-blocking, so we wait until freeswitch's  
     28        # event socket is down, and then wait an additional ten seconds so that  
     29        # freeswitch should be completely shutdown before we start it again 
     30        local retval 
     31        stop 
     32        fs_cli -x status >/dev/null 2>&1 
     33        retval=$? 
     34        while [ $retval -eq 0 ]; do sleep 1; fs_cli -x status >/dev/null 2>&1; retval=$?; done 
     35        sleep 10 
     36        start 
     37} 
Note: See TracChangeset for help on using the changeset viewer.