mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add restart_service_if_running.
This commit is contained in:
parent
96b5d7c947
commit
0661a033fd
@ -128,6 +128,13 @@ function is_process_running($process) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function restart_service_if_running($service) {
|
||||
global $config;
|
||||
if(is_service_running($service))
|
||||
restart_service($service);
|
||||
return;
|
||||
}
|
||||
|
||||
function is_service_running($service, $ps = "") {
|
||||
global $config;
|
||||
if(!$ps) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user