- Install rc-script with resume command support
- Respect installation ${PREFIX} while I'm here
PR: 276991
Submitted by: Viacheslav Chimishuk
28 lines
405 B
Bash
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"
|