I wrote a simple
.service for systemd.
My process starts fine, but it spans more sub-processes with different PIDs.
Hence, I can not properly stop my service with the usual line:
ExecReload=/bin/kill -HUP $MAINPID
because I kill the main original process (a shell script), but not its children.
How can I kill 'em all on restart? Is there a valid macro like $ALLPIDS?
(I am working with Ubuntu 16.04.)