diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/servicewatchdog/services_servicewatchdog_add.php | 6 | ||||
-rw-r--r-- | config/servicewatchdog/servicewatchdog.xml | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/config/servicewatchdog/services_servicewatchdog_add.php b/config/servicewatchdog/services_servicewatchdog_add.php index e5335540..791b973d 100644 --- a/config/servicewatchdog/services_servicewatchdog_add.php +++ b/config/servicewatchdog/services_servicewatchdog_add.php @@ -44,7 +44,8 @@ if (!is_array($config['installedpackages']['servicewatchdog']['item'])) { $config['installedpackages']['servicewatchdog']['item'] = array(); } $a_pwservices = &$config['installedpackages']['servicewatchdog']['item']; -$a_pwservice_names = array(); +// Pre-load "cron" into this array to blacklist it from being offered as a choice. +$a_pwservice_names = array("cron"); foreach ($a_pwservices as $svc) { $a_pwservice_names[] = $svc['name']; } @@ -94,7 +95,8 @@ include("head.inc"); <select name="svcid" class="formselect" id="svcid"> <?php $i=0; foreach ($system_services as $svc): ?> - <?php if (!in_array($svc['name'], $a_pwservice_names)): ?> + <?php if (!empty($svc['name']) && !in_array($svc['name'], $a_pwservice_names)): ?> + <?php $svc['description'] = empty($svc['description']) ? get_pkg_descr($svc['name']) : $svc['description']; ?> <option value="<?= $i ?>"><?=$svc['name'];?>: <?= strlen($svc['description']) > 50 ? substr($svc['description'], 0, 50) . "..." : $svc['description'];?></option> <?php endif; $i++; ?> diff --git a/config/servicewatchdog/servicewatchdog.xml b/config/servicewatchdog/servicewatchdog.xml index 4a6fd6a8..49556a01 100644 --- a/config/servicewatchdog/servicewatchdog.xml +++ b/config/servicewatchdog/servicewatchdog.xml @@ -40,7 +40,7 @@ <requirements>None</requirements> <faq>Monitors for stopped services and restarts them.</faq> <name>Service Watchdog</name> - <version>1.1</version> + <version>1.2</version> <title>Services: Service Watchdog</title> <include_file>/usr/local/pkg/servicewatchdog.inc</include_file> <menu> |