The default start timeout for systemd is 90s
. I want to change it to 300s
. So I change the DefaultTimeoutStartSec
in /etc/systemd/system.conf
# vi /etc/systemd/system.conf
DefaultTimeoutStartSec=90s
But how can I make systemd reload the /etc/systemd/system.conf
? If only change the file, the timeout does not change.
# systemctl show service -p TimeoutStartUSec
TimeoutStartUSec=1min 30s
systemctl daemon-reexec
should solve your problem.
there are only a few properties that you can set thru "set-property" command.
you can get a version of your systemd thru command:
systemctl --version
then you need to update it to get latest commands like "cat" with:
sudo yum update systemd -y
after that you can see stuff that overrides your DefaultTimeoutStartSec=90s run:
systemctl cat <service>
Then you need to create a {service}.service file to override your settings with information from [Service] section from systemctl cat {service} command and restart daemon after that:
echo "[Service]
TimeoutSec=15min
ExecStart=/etc/rc.d/init.d/<service> start
ExecStop=/etc/rc.d/init.d/<service> stop
ExecReload=/etc/rc.d/init.d/<service> reload" > /lib/systemd/system/{service}.service
sudo systemctl daemon-reload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With