Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from prehor/openrc
Add support for systems using OpenRC
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/sbin/openrc-run | ||
|
||
description="Adjust the fan speed according to the temperature of the hard drive" | ||
|
||
cfgfile="/etc/conf.d/hddfancontrol.conf" | ||
pidfile="/run/$RC_SVCNAME.pid" | ||
|
||
command=/usr/bin/hddfancontrol | ||
command_args_background="--background --pid-file $pidfile" | ||
|
||
source $cfgfile | ||
command_args_variable="$(echo $RC_SVCNAME | tr [:lower:] [:upper:])_ARGS" | ||
eval command_args=\$$command_args_variable | ||
|
||
capabilities="CAP_SYS_RAWIO" | ||
|
||
required_files="$cfgfile" | ||
|
||
depend() { | ||
after lm_sensors | ||
} |