summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc4
1 files changed, 1 insertions, 3 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 01230a1..7811635 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -174,9 +174,7 @@ function restart_service($name) {
function is_pid_running($pidfile) {
if (!file_exists($pidfile))
return false;
- $running = shell_exec("/bin/pgrep -F {$pidfile} 2>/dev/null");
-
- return (!empty($running));
+ return isvalidpid($pidfile);
}
function is_dhcp_running($interface) {
OpenPOWER on IntegriCloud