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