Option |
Description |
Type |
Configures the process start-up type. One of:
simple (default) – starts the service immediately. It is expected that the main process of the service is defined in ExecStart .
forking – considers the service started up once the process forks and the parent has exited.
oneshot – similar to simple , but it is expected that the process has to exit before systemd starts follow-up units (useful for scripts that do a single job and then exit). You may want to set RemainAfterExit=yes as well so that systemd still considers the service as active after the process has exited.
dbus – similar to simple , but considers the service started up when the main process gains a D-Bus name.
notify – similar to simple , but considers the service started up only after it sends a special signal to systemd.
idle – similar to simple , but the actual execution of the service binary is delayed until all jobs are finished.
|
ExecStart |
Commands with arguments to execute when the service is started. Type=oneshot enables specifying multiple custom commands that are then executed sequentially. ExecStartPre and ExecStartPost specify custom commands to be executed before and after ExecStart . |
ExecStop |
Commands to execute to stop the service started via ExecStart . |
ExecReload |
Commands to execute to trigger a configuration reload in the service. |
Restart |
With this option enabled, the service shall be restarted when the service process exits, is killed, or a timeout is reached with the exception of a normal stop by the systemctl stop command. |
RemainAfterExit |
If set to True , the service is considered active even when all its processes exited. Useful with Type=oneshot . Default value is False . |