Add "Restart" systemd option
authorJihoon Chung <jihoon.chung@samsaung.com>
Fri, 4 Oct 2013 01:52:47 +0000 (10:52 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:35:12 +0000 (20:35 +0900)
[Issue#]   LINUXWRT-1001
[Problem]  wrt_launchpad_daemon does not restart when daemon is killed.
[Cause]    Missing "Restart" option in the service file, while systemd supports automatic restart.
[Solution] Add "Restart" option to service file.

[Remarks] Reference - https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/Systemd.service
          - Restart=always
           : Configures whether the main service process shall be restarted when it exits.
             Takes one of "once", "restart-on-success" or "restart-always".
             If set to once (the default), the service will not be restarted when it exits.
             If set to restart-on-success, it will be restarted only when it exited cleanly
             (i.e. terminated with an exit code of 0).
             If set to restart-always, the service will be restarted regardless whether it exited
             cleanly or not, or got terminated abnormally by a signal.
          - RestartSec=0
           : Configures the time to sleep before restarting a service (as configured with Restart=).
             Takes a unit-less value in seconds, or a time span value such as "5min 20s".
             Defaults to 100ms.

[SCMRequest] Only applicable to Tizen RSA repository.

Change-Id: I1af7b34a63e7845f3fc575d5f0660a2e250327c8

systemd/wrt_launchpad_daemon@.service

index 7e8b450..2fe098a 100644 (file)
@@ -7,6 +7,8 @@ Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
 Environment=XDG_RUNTIME_DIR=/run/user/%I
 ExecStart=/usr/bin/wrt_launchpad_daemon "                                                                                                                                                                                                         "
 KillSignal=SIGKILL
+Restart=always
+RestartSec=0
 
 [Install]
 WantedBy=graphical.target