Files
ports/sysutils/bsdfan/files/bsdfan.in
Alexey Dokuchaev 45f03c6eb1 sysutils/bsdfan: the port had been improved (+)
- Install rc-script with resume command support
- Respect installation ${PREFIX} while I'm here

PR:		276991
Submitted by:	Viacheslav Chimishuk
2024-12-08 14:27:22 +00:00

28 lines
405 B
Bash

#!/bin/sh
#
# PROVIDE: bsdfan
# REQUIRE: DAEMON
# KEYWORD: resume shutdown
#
. /etc/rc.subr
name="bsdfan"
desc="Control fan speed using temperature sensor"
rcvar="bsdfan_enable"
: ${bsdfan_enable="NO"}
: ${bsdfan_flags="-d"}
command="%%PREFIX%%/bin/${name}"
extra_commands="resume"
resume_cmd="bsdfan_resume"
bsdfan_resume()
{
run_rc_command restart
}
load_rc_config ${name}
run_rc_command "$1"