diff options
| author | Rosen Penev <rosenp@gmail.com> | 2019-04-28 14:24:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-28 14:24:31 -0700 |
| commit | 0038d6e971bf98ef440e15cc3a71e643d4fa65ba (patch) | |
| tree | 6ae547d9879bceb9ef21cb6e571afe2697f49e68 | |
| parent | 65f2802609ac9d3d4491c5a2a1501ab6197df1cb (diff) | |
| parent | c25b7510415ff2327341e9dc4fcc1817a7949b8e (diff) | |
Merge pull request #8830 from cshoredaniel/pr-nut-nutmon+fsd-fixes
nut: nutmon+fsd fixes
| -rw-r--r-- | net/nut/Makefile | 2 | ||||
| -rwxr-xr-x | net/nut/files/nut-monitor.init | 15 | ||||
| -rwxr-xr-x | net/nut/files/nutshutdown | 2 |
3 files changed, 9 insertions, 10 deletions
diff --git a/net/nut/Makefile b/net/nut/Makefile index 555f97357..9f84ed26e 100644 --- a/net/nut/Makefile +++ b/net/nut/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nut PKG_VERSION:=2.7.4 -PKG_RELEASE:=15 +PKG_RELEASE:=16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/ diff --git a/net/nut/files/nut-monitor.init b/net/nut/files/nut-monitor.init index bc463d7f5..e57a2870b 100755 --- a/net/nut/files/nut-monitor.init +++ b/net/nut/files/nut-monitor.init @@ -148,7 +148,6 @@ nut_upsmon_add() { } build_config() { - local runas=nutmon mkdir -m 0750 -p "$(dirname "$UPSMON_C")" config_load nut_monitor @@ -193,6 +192,7 @@ interface_triggers() { } start_service() { + local runas=nutmon local havemon havems build_config @@ -210,16 +210,9 @@ start_service() { return 0 } -restart() { - trap '' TERM - stop "$@" - sleep 2 - trap - TERM - start "$@" -} - reload_service() { if pgrep upsmon >/dev/null 2>/dev/null; then + local runas=nutmon build_config /usr/sbin/upsmon -c reload else @@ -227,6 +220,10 @@ reload_service() { fi } +stop_service() { + upsmon -c stop +} + service_triggers() { config_load nut_monitor interface_triggers "add_trigger" diff --git a/net/nut/files/nutshutdown b/net/nut/files/nutshutdown index 8400c9a6e..86fe01bb9 100755 --- a/net/nut/files/nutshutdown +++ b/net/nut/files/nutshutdown @@ -47,3 +47,5 @@ do_fsd() { poweroff fi } + +do_fsd |
