function daemonStatus($daemon, $args = false) { global $daemon_status; initDaemonStatus(); $string = "{$daemon}"; if ($args) { $string .= " {$args}"; } return strpos($daemon_status, "'{$string}' running") !== false; }
function daemonStatus( $daemon, $args=false ) { global $daemon_status; initDaemonStatus(); $string = "$daemon"; if ( $args ) $string .= " $args"; return( strpos( $daemon_status, "'$string' running" ) !== false ); }