From c8c5d80de864eb6012dc3d234176b1e7b11e79a5 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Thu, 6 Aug 2015 15:27:42 +0200 Subject: blinkled.inc - remove a redundant check, add move descriptive comment --- config/blinkled8/blinkled.inc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'config/blinkled8') diff --git a/config/blinkled8/blinkled.inc b/config/blinkled8/blinkled.inc index 0980b253..6e76c157 100644 --- a/config/blinkled8/blinkled.inc +++ b/config/blinkled8/blinkled.inc @@ -63,7 +63,7 @@ function sync_package_blinkled() { blinkled_rcfile(); $blinkled_config = $config['installedpackages']['blinkled']['config'][0]; - /* If the service is not enabled, do nothing */ + /* If the service (being) disabled, stop it (if running) and do nothing else */ if (!($blinkled_config['enable'])) { if (is_process_running("blinkled")) { stop_service("blinkled"); @@ -74,10 +74,7 @@ function sync_package_blinkled() { if (is_process_running("blinkled")) { stop_service("blinkled"); } - /* If blinkled is not running, start it */ - if (!is_process_running("blinkled")) { - start_service("blinkled"); - } + start_service("blinkled"); } function blinkled_launch($int, $led, $return = false) { -- cgit v1.2.3