From c3debb741a214f7a4774e8b5d1c6cd076b6a95e0 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Tue, 11 Aug 2015 16:07:50 +0200 Subject: nut - fix bogus boot check (hopefully fixes Bug #4426) --- config/nut/nut.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 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)) { -- cgit v1.2.3 From 3ee968c508b4cfe0b131e5df4c4321d5de69bc27 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Tue, 11 Aug 2015 16:14:37 +0200 Subject: Bump nut package version --- pkg_config.10.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ Network UPS Tools. http://www.networkupstools.org/ Network Management - 2.0.6 + 2.0.7 BETA 2.2 rswagoner@gmail.com -- cgit v1.2.3