mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-23 15:37:58 +02:00
Bug: https://bugs.gentoo.org/954303 Closes: https://bugs.gentoo.org/952749 Signed-off-by: INODE64 <web@inode64.com> Part-of: https://github.com/gentoo/gentoo/pull/41698 Closes: https://github.com/gentoo/gentoo/pull/41698 Signed-off-by: Sam James <sam@gentoo.org>
34 lines
635 B
Text
34 lines
635 B
Text
#!/sbin/openrc-run
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
extra_started_commands="reload"
|
|
|
|
pidfile=/run/nut/upslog.pid
|
|
bin=/usr/bin/upslog
|
|
|
|
depend() {
|
|
use upsdrv
|
|
after upsdrv
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -q -d -m 0700 -o nut:nut /run/nut
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting upslog"
|
|
start-stop-daemon --start --quiet --exec ${bin}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping upslog"
|
|
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
|
eend $?
|
|
}
|
|
reload() {
|
|
ebegin "Reloading upslog"
|
|
start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile}
|
|
eend $?
|
|
}
|