diff --git a/scripts/auto-cpufreq-install.sh b/scripts/auto-cpufreq-install.sh index d29372a..caade09 100755 --- a/scripts/auto-cpufreq-install.sh +++ b/scripts/auto-cpufreq-install.sh @@ -11,6 +11,9 @@ then exit 1 fi +# this is needed on SELinux enabled systems (see also ConditionPathExists in .service) +touch /var/log/auto-cpufreq.log + echo -e "\n* Reloading systemd manager configuration" systemctl daemon-reload @@ -28,4 +31,4 @@ echo -e "\n------------------ auto-cpufreq daemon installed and running -------- echo -e "To view live log, run:\nauto-cpufreq --log" echo -e "\nTo disable and remove auto-cpufreq daemon, run:\nsudo auto-cpufreq --remove" -echo -e "\n-------------------------------------------------------------------------------\n" \ No newline at end of file +echo -e "\n-------------------------------------------------------------------------------\n" diff --git a/scripts/auto-cpufreq.service b/scripts/auto-cpufreq.service index 9c13d30..e47dbd3 100644 --- a/scripts/auto-cpufreq.service +++ b/scripts/auto-cpufreq.service @@ -1,6 +1,7 @@ [Unit] Description=auto-cpufreq - Automatic CPU speed & power optimizer for Linux After=network.target network-online.target +ConditionPathExists=/var/log/auto-cpufreq.log [Service] Type=simple @@ -8,4 +9,4 @@ User=root ExecStart=/usr/bin/python3 /usr/bin/auto-cpufreq --daemon StandardOutput=file:/var/log/auto-cpufreq.log [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target