aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gwled/gwled.inc12
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']) &&