'blinkled.sh', 'start' => $start, 'stop' => $stop) ); conf_mount_ro(); } function sync_package_blinkled() { global $config; blinkled_rcfile(); $blinkled_config = $config['installedpackages']['blinkled']['config'][0]; /* 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"); } return; } /* Kill all instances of blinkled */ if (is_process_running("blinkled")) { stop_service("blinkled"); } start_service("blinkled"); } function blinkled_launch($int, $led, $return = false) { $cmd = "/usr/local/bin/blinkled -i " . escapeshellarg($int) . " -l " . escapeshellarg("/dev/led/led{$led}"); if ($return) { return $cmd; } else { mwexec($cmd); } } function validate_form_blinkled($post, &$input_errors) { /* Make sure both aren't using the same interface */ if (($post['iface_led2']) && ($post['iface_led3']) && (($post['enable_led2']) && ($post['enable_led3'])) && ($post['iface_led2'] == $post['iface_led3'])) { $input_errors[] = 'You cannot set two LEDs for a single interface. Please choose seperate interfaces.'; } } ?>