mirror of
https://github.com/octoleo/syncthing.git
synced 2025-04-11 03:51:51 +00:00
systemd units for system/user
This commit is contained in:
parent
d3f6cb860f
commit
c47be7b415
14
etc/systemd/system/syncthing@.service
Normal file
14
etc/systemd/system/syncthing@.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Syncthing service for %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=%i
|
||||
Environment=STARGS=
|
||||
EnvironmentFile=-/etc/default/syncthing
|
||||
Environment=STNORESTART=yes
|
||||
ExecStart=/usr/bin/syncthing ${STARGS}
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
12
etc/systemd/user/syncthing.service
Normal file
12
etc/systemd/user/syncthing.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Syncthing service
|
||||
|
||||
[Service]
|
||||
Environment=STARGS=
|
||||
EnvironmentFile=-%h/.config/syncthing/environment
|
||||
Environment=STNORESTART=yes
|
||||
ExecStart=/usr/bin/syncthing ${STARGS}
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=cmdline.target
|
Loading…
x
Reference in New Issue
Block a user