I am trying to write a few services. Some of them have \'type\' option set to oneshot. But i am still confused when the option \'RemainAfterExit\' needs to be set true. (not
From Systemd page below is the description of RemainAfterExit
RemainAfterExit= Takes a boolean value that specifies whether the service shall be considered active even when all its processes exited. Defaults to no.
This simply means that if all your processes started from service exits, when you query the status of the service, its still says active if this flag is set to true. If set to false, then service status is inactive.
This is particularly useful when you are adding dependency on services during bootup. wherein the service status is important to start dependent services.