aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/nut/nut.inc6
-rw-r--r--pkg_config.10.xml2
2 files changed, 4 insertions, 4 deletions
diff --git a/config/nut/nut.inc b/config/nut/nut.inc
index fbc75a30..e0ca9d30 100644
--- a/config/nut/nut.inc
+++ b/config/nut/nut.inc
@@ -512,13 +512,13 @@ EOD;
$return = sync_package_nut_snmp();
}
- if ($return && $_POST['monitor']) {
- /* only start if changing settings as we have a startup script for system boot */
+ if ((!platform_booting()) && (nut_config('monitor'))) {
+ /* only start if enabled and system is not booting */
/* this prevents service from starting / stopping / starting on boot */
log_error("[nut] INFO: Starting service");
start_service("nut");
- if ((int)exec('/bin/pgrep upsmon | /usr/bin/wc -l') == 0) {
+ if (!is_process_running('upsmon')) {
log_error("[nut] ERROR: Service failed to start: check configuration.");
}
} elseif (!$return && file_exists(NUT_RCFILE)) {
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 4a403522..8bb50707 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -814,7 +814,7 @@
<descr>Network UPS Tools.</descr>
<website>http://www.networkupstools.org/</website>
<category>Network Management</category>
- <version>2.0.6</version>
+ <version>2.0.7</version>
<status>BETA</status>
<required_version>2.2</required_version>
<maintainer>rswagoner@gmail.com</maintainer>