Hello, On a CentOS host, I use the RedHat init script to start up Freeswitch at boot time: ---- http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Running_FreeSWITCH cp build/freeswitch.init.redhat /etc/init.d/freeswitch chmod 755 /etc/init.d/freeswitch ---- However, I also use this script to start the server semi-manually when doing tests, but the script returns "OK" right away, even though Freeswitch is still in the process of starting up (eg. NAT, PMP, etc.) so I have to wait about 20 seconds before running fs_cli so I can connect to it without an error. What should I add/change to the init script so that it only returns "OK" once FS is really up and running? Thank you. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/init-d-Waiting-until-FS-is-act... Sent from the freeswitch-users mailing list archive at Nabble.com.
On 05/26/2010 12:50 PM, GillesToo wrote: [snip]
What should I add/change to the init script so that it only returns "OK" once FS is really up and running?
I don't think there is a solution for this as (iirc) the "OK" is based on the resultcode from starting "daemon" and not from starting freeswitch itself. Regards, Patrick
Too bad, but I can live with that. Thanks. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/init-d-Waiting-until-FS-is-act... Sent from the freeswitch-users mailing list archive at Nabble.com.
You could code in a while loop into the script to run fs_cli -x "status" until it works, but it would require mod_event_socket On Wed, May 26, 2010 at 9:05 AM, GillesToo <codecomplete@free.fr> wrote:
Too bad, but I can live with that. Thanks. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/init-d-Waiting-until-FS-is-act... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
Anthony Minessale wrote:
You could code in a while loop into the script to run
fs_cli -x "status"
until it works, but it would require mod_event_socket
Thanks for the tip. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/init-d-Waiting-until-FS-is-act... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (3)
-
Anthony Minessale
-
GillesToo
-
Patrick Lists