mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
MFC 12461
"\t0\n" > 0, therefore is_process_running always returned 1. Btw, now it returns true or false, cause I don't see how it could be any different. Should just work now.
This commit is contained in:
parent
610b113684
commit
5b67f7acd5
@ -133,9 +133,8 @@ function restart_service($name) {
|
||||
}
|
||||
|
||||
function is_process_running($process) {
|
||||
$status = `/bin/ps awux | /usr/bin/grep {$process} | grep -v grep | wc -l`;
|
||||
if($status > 0) return 1;
|
||||
return 0;
|
||||
$running = (trim(shell_exec("ps axwu | grep $process | grep -v grep")) != '');
|
||||
return $running;
|
||||
}
|
||||
|
||||
function is_dhcp_running($interface) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user