From 3bd706327032ea797463c3b0291b5e60c7f53443 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Fri, 4 Oct 2013 10:52:47 +0900 Subject: [PATCH] Add "Restart" systemd option [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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemd/wrt_launchpad_daemon@.service b/systemd/wrt_launchpad_daemon@.service index 7e8b450..2fe098a 100644 --- a/systemd/wrt_launchpad_daemon@.service +++ b/systemd/wrt_launchpad_daemon@.service @@ -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 -- 2.7.4