Hello. On Mon, Mar 04, 2024 at 06:47:42PM +0400, Vadim Nevorotin <nevorotin@xxxxxxxxx> wrote: > One of them - how to support different "reload" modes? We need to start > some control process in the context of service (like ExecReload does), but > this process supports some arguments and we need to pass them in time of > 'systemctl reload' call. Previously we have commands like: > > /etc/init.d/ourservice reload|soft-reload|hard-reload [--someargs] I assume the command + args must be somehow delivered to the service process (e.g. written to a socket). (DM) > All doing different actions, manipulating service main process/workers and > pidfiles, How can I do it with systemd? Did I miss something in the > documentation? It seems to me you're focusing too much on the reload aspect whereas it is a generic communication with the service (because of the parametrization). Simply use the delivery mechanism above (DM) and if it should result in the replacement of tha mein service process send MAINPID=" via sd_notify(). HTH, Michal
Attachment:
signature.asc
Description: PGP signature