diff options
author | doktornotor <notordoktor@gmail.com> | 2015-08-03 16:08:41 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-08-03 16:08:41 +0200 |
commit | 991f3d0f5edb2dec1ea69b28da406e0108365177 (patch) | |
tree | 444ecf6fad275960bd3bf286c7512e5a846fcc1d | |
parent | 7e4dde28a2a9202e2ecd49c7d2171a9f6a9dc3b4 (diff) | |
download | pfsense-packages-991f3d0f5edb2dec1ea69b28da406e0108365177.tar.gz pfsense-packages-991f3d0f5edb2dec1ea69b28da406e0108365177.tar.bz2 pfsense-packages-991f3d0f5edb2dec1ea69b28da406e0108365177.zip |
gwled.inc - use is_process_running() and nuke pointless functions
-rw-r--r-- | config/gwled/gwled.inc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/config/gwled/gwled.inc b/config/gwled/gwled.inc index ce6f23d9..ff62e562 100644 --- a/config/gwled/gwled.inc +++ b/config/gwled/gwled.inc @@ -30,17 +30,13 @@ require_once("functions.inc"); -function gwled_running () { - return ((int)exec('/bin/pgrep -f gwled | /usr/bin/wc -l') > 0); -} - function sync_package_gwled() { global $config; $gwled_config = $config['installedpackages']['gwled']['config'][0]; led_normalize(); /* Kill all instances of gwled */ - if (gwled_running()) { - gwled_stop(); + if (is_process_running("gwled")) { + mwexec("/bin/pkill -9 -f gwled"); } gwled_start(); } @@ -62,10 +58,6 @@ function gwled_start() { } } -function gwled_stop() { - exec("/bin/pkill -9 -f gwled"); -} - function validate_form_gwled($post, &$input_errors) { /* Make sure both aren't using the same interface */ if (($post['gw_led2']) && ($post['gw_led3']) && |