Can a service application restart itself as a service?

Bo Berglund bo.berglund at gmail.com
Thu May 20 12:23:38 UTC 2021


I am writing a service application for Linux.
I want it to be able to restart itself, but I don't now the best way to do it.

To use cron to issue "systemctrl restart service" at a given time does not cut
it because the application might be busy doing things at that time.
It has to be in an idle state when it restarts.

The only thing I could figure out is if the application itself can restart the
service from within when it has reached a safe idle spot.

Any ideas?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list