diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-11 16:59:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-11 16:59:41 -0300 |
commit | 0896906957daf716697508ee8a2e685e6e276e91 (patch) | |
tree | a1dafd60d2b0845b2a839d3d5eb483f18b3ad5fe /config/nut | |
parent | 94552b1db607bd973becb7eb8e0d3e32d9fd4b90 (diff) | |
parent | fb2aaef04afcac0361317a519244013bb2b6b1be (diff) | |
download | pfsense-packages-0896906957daf716697508ee8a2e685e6e276e91.tar.gz pfsense-packages-0896906957daf716697508ee8a2e685e6e276e91.tar.bz2 pfsense-packages-0896906957daf716697508ee8a2e685e6e276e91.zip |
Merge pull request #1060 from doktornotor/patch-7
Diffstat (limited to 'config/nut')
-rw-r--r-- | config/nut/nut.inc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/config/nut/nut.inc b/config/nut/nut.inc index 71b06932..a864b965 100644 --- a/config/nut/nut.inc +++ b/config/nut/nut.inc @@ -492,8 +492,7 @@ EOD; } function sync_package_nut() { - global $config; - global $input_errors; + global $g, $config, $input_errors; stop_service("nut"); @@ -509,10 +508,12 @@ EOD; $return = sync_package_nut_snmp(); } - if ((!platform_booting()) && (nut_config('monitor'))) { - /* only start if enabled and system is not booting */ - /* this prevents service from starting / stopping / starting on boot */ - + /* only start if enabled and system is not booting */ + /* this prevents service from starting / stopping / starting on boot */ + if ((function_exists("platform_booting")) && (!platform_booting()) && (nut_config('monitor'))) { + log_error("[nut] INFO: Starting service"); + start_service("nut"); + } elseif ((!($g['booting'])) && (nut_config('monitor'))) { log_error("[nut] INFO: Starting service"); start_service("nut"); } elseif (!$return && file_exists(NUT_RCFILE)) { |