mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-02 06:22:37 +01:00
supervise-daemon is still experimental and has bad defaults. Users can enable supervise-daemon, if they want to, simply by declaring `supervisor=supervise-daemon` in /etc/conf.d/smartd. See my mail from Tue, 15 Dec 2020 15:33:16 +0100 in alpine-devel mailing-list in topic "Use of supervise-daemon in Alpine". (I cannot simply reference it from ML archive because it's broken.)
32 lines
673 B
Plaintext
32 lines
673 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
name=smartd
|
|
description="Daemon to monitor the S.M.A.R.T. system built into storage devices"
|
|
description_reload="Reload configuration without exiting"
|
|
extra_started_commands="reload"
|
|
|
|
: ${cfgfile:="/etc/smartd.conf"}
|
|
|
|
command=/usr/sbin/smartd
|
|
command_args="--configfile=$cfgfile --no-fork ${command_args:-$SMARTD_OPTS}"
|
|
command_background="yes"
|
|
pidfile="/run/$RC_SVCNAME.pid"
|
|
|
|
required_files="$cfgfile"
|
|
|
|
depend() {
|
|
need localmount
|
|
after bootmisc
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading $name configuration"
|
|
|
|
if [ "$supervisor" ]; then
|
|
$supervisor "$RC_SVCNAME" --signal HUP
|
|
else
|
|
start-stop-daemon --signal HUP --pidfile "$pidfile"
|
|
fi
|
|
eend $?
|
|
}
|