From c586a179269bd3c5bddc8a1afdf5cdc1d8530b2b Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Sun, 1 Feb 2015 23:55:54 +0100 Subject: [PATCH] Added exit code definitions to systemd service files (fixes #1324) --- etc/linux-systemd/system/syncthing@.service | 3 +++ etc/linux-systemd/user/syncthing.service | 3 +++ 2 files changed, 6 insertions(+) diff --git a/etc/linux-systemd/system/syncthing@.service b/etc/linux-systemd/system/syncthing@.service index 5f6ffbd38..12528537f 100644 --- a/etc/linux-systemd/system/syncthing@.service +++ b/etc/linux-systemd/system/syncthing@.service @@ -9,6 +9,9 @@ EnvironmentFile=-/etc/default/syncthing Environment=STNORESTART=yes ExecStart=/usr/bin/syncthing ${STARGS} Restart=on-failure +RestartPreventExitStatus=1 +SuccessExitStatus=2 +RestartForceExitStatus=3 4 [Install] WantedBy=multi-user.target diff --git a/etc/linux-systemd/user/syncthing.service b/etc/linux-systemd/user/syncthing.service index 6f10539fa..e0c51b87a 100644 --- a/etc/linux-systemd/user/syncthing.service +++ b/etc/linux-systemd/user/syncthing.service @@ -7,6 +7,9 @@ EnvironmentFile=-%h/.config/syncthing/environment Environment=STNORESTART=yes ExecStart=/usr/bin/syncthing ${STARGS} Restart=on-failure +RestartPreventExitStatus=1 +SuccessExitStatus=2 +RestartForceExitStatus=3 4 [Install] WantedBy=cmdline.target