1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 02:35:23 +03:00
aports/testing/nut/upsmon.initd
Valery Kartel 2275192021 testing/nut: fix user creation in post-install
--
add nut home dir /var/lib/nut used for scheduler
fix libexec and driver dirs (libexec -> lib)
add using dns in init-scripts
remove conf.d files from package because it have no sence for now
cleanups in APKBUILD and init-scripts
2017-06-02 08:02:44 +00:00

35 lines
656 B
Text

#!/sbin/openrc-run
name="UPS Monitor"
pidfile=/run/upsmon.pid
command=/usr/sbin/upsmon
required_files="/etc/nut/nut.conf /etc/nut/upsmon.conf"
extra_started_commands="reload"
start_stop_daemon_args="--quiet"
depend() {
. /etc/nut/nut.conf
case $MODE in
standalone|netserver)
need nut-upsd
;;
esac
use net dns
}
start_pre() {
. /etc/nut/nut.conf
case $MODE in
none)
eerror "$name disabled, please adjust the configuration to your needs"
eerror "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
return 1
;;
esac
}
reload() {
ebegin "Reloading $name"
start-stop-daemon --signal HUP --pidfile $pidfile
eend $?
}