From 0d37a1ef234c38b27faba43bc3a22f985d311deb Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 17 May 2023 17:01:27 +0100 Subject: Remove all firmware --- repo/smartmontools/smartd.initd | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 repo/smartmontools/smartd.initd (limited to 'repo/smartmontools/smartd.initd') diff --git a/repo/smartmontools/smartd.initd b/repo/smartmontools/smartd.initd new file mode 100644 index 0000000..b117aa9 --- /dev/null +++ b/repo/smartmontools/smartd.initd @@ -0,0 +1,31 @@ +#!/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 $? +} -- cgit v1.2.1