0

I read https://unix.stackexchange.com/a/328354 and it convinced me that systemd indeed has to be rebuilt for this value to be changed.

Is this the case or does anyone have another solution for this? (Other than programming such feature and patching systemd with that.)

  • Note carefully the scenario in that question. The questioner was using an LSB rc script, and the alteration is to the generator that handles such scripts. Making the generator generate units differently is rather different to what you are talking about. Also note what I wrote about just not doing it that way at all in the first place, and what the questioner wrote about things that xe had tried. – JdeBP Jul 21 '17 at 7:34
  • If you're talking about the timeouts during startup and shutdown that start at 30 seconds then trail upwards in 30 second increments, then you CAN change that without a recompile. Edit /etc/systemd/system.conf. There are a couple timeouts listed in there, you can adjust the time to something reasonable like 10 or 15 seconds. Restart and you should be good. – Cory T Jul 21 '17 at 16:47
1

Unless you are using an rc script like the asker in the question you linked, you can set DefaultTimeoutStopSec=10s in /etc/systemd/system.conf. You can change 10s to whatever timeout you want, of course.

If you write your services as systemd unit files, there is no need to recompile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.