I have a situation where I want to start a new process on exit, unfortunately ExecStop doesn't honour RemainAfterExit or KillMode. ExecStart and ExecStop are not symmetrical in operation. We have a fastCgi service, when we stop the service for maintenance we automatically start second fastCgi service which is essentially a (we're under maintenance, which is use by mobile applications to display a service is not available right now, which is different from a 500 error in our case) All processes spawned by ExecStop are killed on exit, which is frustrating.
I think they were never intended to be symmetrical. Do you want a unit to be considered "active" after it is "stopped" if RemainAfterExit=yes? This makes no sense. For your situation, use 2 separate services.
Closing, due to lack of response.
Honestly what comment could I make that would get the systemd maintainers to take this seriously? Admittedly this is a corner case and I imagine most people will just manually stop and start their services, but there was a better way once, no longer. Asymmetry (or un-orthogonality) is a code (design) smell. It's also means that things that could be done before systemd can no longer be performed, which is a loss of functionality.
Well, one option would be to use ExecStop=/usr/bin/systemctl --no-block someotherservice.service or so...
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.