mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-23 07:08:24 +00:00
Some systemd tweaks
- Removed environment file to keep the service file minimal. "systemctl edit syncthing.service" does the job if somebody wants to customize the service. - Changed "cmdline.target" to "default.target" as "cmdline.target" does not exist in systemd.special: http://www.freedesktop.org/software/systemd/man/systemd.special.html - Added a missing "After=network.target". - Added a documentation hint, thx @jaystrictor
This commit is contained in:
parent
57028e3acc
commit
153091f52f
@ -1,13 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Syncthing service for %i
|
Description=Syncthing - Open Source Continuous File Synchronization for %I
|
||||||
|
Documentation=https://github.com/syncthing/syncthing/wiki
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=%i
|
User=%i
|
||||||
Environment=STARGS=
|
|
||||||
EnvironmentFile=-/etc/default/syncthing
|
|
||||||
Environment=STNORESTART=yes
|
Environment=STNORESTART=yes
|
||||||
ExecStart=/usr/bin/syncthing ${STARGS}
|
ExecStart=/usr/bin/syncthing
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartPreventExitStatus=1
|
RestartPreventExitStatus=1
|
||||||
SuccessExitStatus=2
|
SuccessExitStatus=2
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Syncthing service
|
Description=Syncthing - Open Source Continuous File Synchronization
|
||||||
|
Documentation=https://github.com/syncthing/syncthing/wiki
|
||||||
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=STARGS=
|
|
||||||
EnvironmentFile=-%h/.config/syncthing/environment
|
|
||||||
Environment=STNORESTART=yes
|
Environment=STNORESTART=yes
|
||||||
ExecStart=/usr/bin/syncthing ${STARGS}
|
ExecStart=/usr/bin/syncthing
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartPreventExitStatus=1
|
RestartPreventExitStatus=1
|
||||||
SuccessExitStatus=2
|
SuccessExitStatus=2
|
||||||
RestartForceExitStatus=3 4
|
RestartForceExitStatus=3 4
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=cmdline.target
|
WantedBy=default.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user