2020-01-02 13:06:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# auto-cpufreq daemon removal script
|
|
|
|
# reference: https://github.com/AdnanHodzic/auto-cpufreq
|
|
|
|
|
|
|
|
echo -e "\n------------------ Running auto-cpufreq daemon removal script ------------------"
|
|
|
|
|
|
|
|
if [[ $EUID != 0 ]];
|
|
|
|
then
|
|
|
|
echo -e "\nERROR\nMust be run as root (i.e: 'sudo $0')\n"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-01-03 16:27:41 +01:00
|
|
|
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
2020-01-03 14:09:07 +01:00
|
|
|
systemctl stop auto-cpufreq
|
|
|
|
|
2020-01-03 16:27:41 +01:00
|
|
|
echo -e "\n* Disabling auto-cpufreq daemon (systemd) at boot"
|
2020-01-02 13:06:43 +01:00
|
|
|
systemctl disable auto-cpufreq
|
|
|
|
|
2020-01-03 16:27:41 +01:00
|
|
|
echo -e "\n* Removing auto-cpufreq daemon (systemd) unit file"
|
2020-01-07 18:46:51 +01:00
|
|
|
rm /etc/systemd/system/auto-cpufreq.service
|
2020-01-02 13:06:43 +01:00
|
|
|
|
|
|
|
echo -e "\n* Reloading systemd manager configuration"
|
2020-01-03 14:09:07 +01:00
|
|
|
systemctl daemon-reload
|
|
|
|
|
|
|
|
echo -e "reset failed"
|
2020-02-08 21:04:34 +01:00
|
|
|
systemctl reset-failed
|