diff options
author | h8red | 2015-09-14 22:43:40 +0300 |
---|---|---|
committer | h8red | 2015-09-14 22:43:40 +0300 |
commit | d630474da42dd527731eb8e7cbfc642feb60766c (patch) | |
tree | fc04e72acc243427e18506865acdee868e9842f0 /cpufreqd | |
download | aur-d630474da42dd527731eb8e7cbfc642feb60766c.tar.gz |
Initial import
Diffstat (limited to 'cpufreqd')
-rw-r--r-- | cpufreqd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cpufreqd b/cpufreqd new file mode 100644 index 000000000000..d2f2a89bf6e6 --- /dev/null +++ b/cpufreqd @@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/cpufreqd` +case "$1" in + start) + stat_busy "Starting cpufreqd" + [ -z "$PID" ] && /usr/bin/cpufreqd + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon cpufreqd + stat_done + fi + ;; + stop) + stat_busy "Stopping cpufreqd" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon cpufreqd + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |