From 05ab46353f2460d272082cc43a41c99f5fdc4637 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 29 Jan 2009 20:34:36 +0000 Subject: FreeSWITCH package check to see if the FreeSWITCH service is running before displaying the 'Status' tab start it automatically if it is not started. --- packages/freeswitch/freeswitch_status.tmp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/freeswitch/freeswitch_status.tmp') diff --git a/packages/freeswitch/freeswitch_status.tmp b/packages/freeswitch/freeswitch_status.tmp index 07128835..2d84a6ec 100644 --- a/packages/freeswitch/freeswitch_status.tmp +++ b/packages/freeswitch/freeswitch_status.tmp @@ -97,6 +97,12 @@ $port = $config['installedpackages']['freeswitchsettings']['config'][0]['event_s $host = $config['interfaces']['lan']['ipaddr']; $savemsg = $_GET["savemsg"]; + +//if freeswitch is not running then start it +if (!pkg_is_service_running('freeswitch')) { + $handle = popen("/usr/local/etc/rc.d/freeswitch.sh start", "r"); + pclose($handle); +} ?> -- cgit v1.2.3