summarylogtreecommitdiffstats
path: root/cpufreqd
diff options
context:
space:
mode:
authorh8red2015-09-14 22:43:40 +0300
committerh8red2015-09-14 22:43:40 +0300
commitd630474da42dd527731eb8e7cbfc642feb60766c (patch)
treefc04e72acc243427e18506865acdee868e9842f0 /cpufreqd
downloadaur-d630474da42dd527731eb8e7cbfc642feb60766c.tar.gz
Initial import
Diffstat (limited to 'cpufreqd')
-rw-r--r--cpufreqd35
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