From 9a77cafd7e400640a855f8f5112dd59c93af92a7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 10 Dec 2010 12:48:58 +0000 Subject: Fix all this packages from their copy/paste legacy. Mostly protect poorly choosen function names with function_exists. --- config/freeswitch/freeswitch.inc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'config/freeswitch') diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index 147125a7..0c073487 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -131,19 +131,21 @@ function guid() //echo guid(); -function pkg_is_service_running($servicename) -{ - //exec("/bin/ps ax | awk '{ print $5 }'", $psout); - //array_shift($psout); - //foreach($psout as $line) { - // $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); - //} - //if(pkg_is_service_running($servicename, $ps) or is_process_running($servicename) ) { - return true; - //} - //else { - // return false; - //} +if (!function_exists("pkg_is_service_running")) { + function pkg_is_service_running($servicename) + { + //exec("/bin/ps ax | awk '{ print $5 }'", $psout); + //array_shift($psout); + //foreach($psout as $line) { + // $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); + //} + //if(pkg_is_service_running($servicename, $ps) or is_process_running($servicename) ) { + return true; + //} + //else { + // return false; + //} + } } -- cgit v1.2.3