Create logfile before starting the deamon
- on SELinux enabled systems, the daemon fails to start unless the logfile is already present, because the systemd unit file redirects the STDOUT to a file.
This commit is contained in:
parent
810186123b
commit
6d7c7a7495
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue