mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-27 07:34:25 +02:00
Merge pull request #1 from aroundthfur/master
Create logfile before starting the deamon
This commit is contained in:
commit
0c27f6a1b5
@ -11,6 +11,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
echo -e "\n* Reloading systemd manager configuration"
|
||||||
systemctl daemon-reload
|
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 "To view live log, run:\nauto-cpufreq --log"
|
||||||
echo -e "\nTo disable and remove auto-cpufreq daemon, run:\nsudo auto-cpufreq --remove"
|
echo -e "\nTo disable and remove auto-cpufreq daemon, run:\nsudo auto-cpufreq --remove"
|
||||||
|
|
||||||
echo -e "\n-------------------------------------------------------------------------------\n"
|
echo -e "\n-------------------------------------------------------------------------------\n"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=auto-cpufreq - Automatic CPU speed & power optimizer for Linux
|
Description=auto-cpufreq - Automatic CPU speed & power optimizer for Linux
|
||||||
After=network.target network-online.target
|
After=network.target network-online.target
|
||||||
|
ConditionPathExists=/var/log/auto-cpufreq.log
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@ -8,4 +9,4 @@ User=root
|
|||||||
ExecStart=/usr/bin/python3 /usr/bin/auto-cpufreq --daemon
|
ExecStart=/usr/bin/python3 /usr/bin/auto-cpufreq --daemon
|
||||||
StandardOutput=file:/var/log/auto-cpufreq.log
|
StandardOutput=file:/var/log/auto-cpufreq.log
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user