Peter Hoeg 11 лет назад
Родитель
Сommit
c47be7b415
2 измененных файлов с 26 добавлено и 0 удалено
  1. 14 0
      etc/systemd/system/[email protected]
  2. 12 0
      etc/systemd/user/syncthing.service

+ 14 - 0
etc/systemd/system/[email protected]

@@ -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 - 0
etc/systemd/user/syncthing.service

@@ -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