diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-06-06 11:54:05 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-06-06 11:54:05 -0300 |
commit | ad03afb62ab39cad2614ae4226a6444b6f3b569d (patch) | |
tree | 166f4b54df3523bcf4104192c0fcfa0abf7ebf7f /etc | |
parent | 4cc342453cce69fc8da06ff22bbe79aadb7bd4df (diff) | |
download | pfsense-ad03afb62ab39cad2614ae4226a6444b6f3b569d.zip pfsense-ad03afb62ab39cad2614ae4226a6444b6f3b569d.tar.gz |
Escape argument on call to is_process_running too, also remove some unecessary mwexec() calls
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/service-utils.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 7b78f5f..2c4b22c 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -144,7 +144,7 @@ function stop_service($name) { if(!($service['rcfile'] or $service['stopcmd'])) { if(is_process_running("{$service['executable']}")) - mwexec("/usr/bin/killall {$service['executable']}"); + killbyname($service['executable']); return; } break; @@ -152,8 +152,8 @@ function stop_service($name) { } } /* finally if we get here lets simply kill the service name */ - if(is_process_running("{$name}")) - mwexec("/usr/bin/killall " . escapeshellarg($name)); + if(is_process_running(escapeshellarg($name))) + killbyname(escapeshellarg($name)); } function restart_service($name) { |