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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.