2020-01-03 16:27:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# auto-cpufreq daemon install script
|
|
|
|
# reference: https://github.com/AdnanHodzic/auto-cpufreq
|
|
|
|
|
|
|
|
echo -e "\n------------------ Running auto-cpufreq daemon install script ------------------"
|
|
|
|
|
|
|
|
if [[ $EUID != 0 ]];
|
|
|
|
then
|
|
|
|
echo -e "\nERROR\nMust be run as root (i.e: 'sudo $0')\n"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-01-07 18:46:51 +01:00
|
|
|
echo -e "\n* Deploy auto-cpufreq systemd unit file"
|
2020-01-26 10:13:16 +01:00
|
|
|
cp /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service
|
2020-01-07 18:46:51 +01:00
|
|
|
|
2020-01-03 16:27:41 +01:00
|
|
|
echo -e "\n* Reloading systemd manager configuration"
|
|
|
|
systemctl daemon-reload
|
|
|
|
|
|
|
|
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
|
|
|
systemctl stop auto-cpufreq
|
|
|
|
|
|
|
|
echo -e "\n* Starting auto-cpufreq daemon (systemd) service"
|
|
|
|
systemctl start auto-cpufreq
|
|
|
|
|
|
|
|
echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot"
|
2020-02-08 14:32:58 +01:00
|
|
|
systemctl enable auto-cpufreq
|