function action_stop() { global $config, $status; if (!$status) { return false; } spawnProcess($config['stop_cmd']); $status = is_running(); return "Stop executed"; }
function action_stop() { global $config, $status; if (!$status) { return false; } if (isWin()) { $command = 'taskkill /F /pid ' . $status['PID']; } else { $command = $config['stop_cmd']; } spawnProcess($command); $status = is_running(); return "Stop executed"; }