aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/services/syncthing.scm
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-04-20 17:17:57 -0700
committerGravatar Tom Willemse2022-04-20 17:17:57 -0700
commit211bfcb54435e19bc587d94dcafce2ab311fa311 (patch)
treed2c83f78c72c839f8ff694183f2f310a4bde5dae /oni/home/services/syncthing.scm
parent1f0cfee5a7b513177aead4d5ee44da34febc532a (diff)
downloadnew-dotfiles-211bfcb54435e19bc587d94dcafce2ab311fa311.tar.gz
new-dotfiles-211bfcb54435e19bc587d94dcafce2ab311fa311.zip
Use forkexec, not system, constructor for syncthing
I thought that ‘syncthing-gtk’ was a program that would fork (given the fact that it has a ‘--quit’ command), but it turns out that it doesn't. Using the system constructor means that shepherd will block until ‘syncthing-gtk’ is closed.
Diffstat (limited to 'oni/home/services/syncthing.scm')
-rw-r--r--oni/home/services/syncthing.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/oni/home/services/syncthing.scm b/oni/home/services/syncthing.scm
index 821f813..eee8d23 100644
--- a/oni/home/services/syncthing.scm
+++ b/oni/home/services/syncthing.scm
@@ -25,13 +25,12 @@
(provision '(syncthing))
(auto-start? #t)
(start
- #~(make-system-constructor
- #$(file-append (home-syncthing-configuration-package config) "/bin/syncthing-gtk")
- " --minimized"))
+ #~(make-forkexec-constructor
+ (list #$(file-append (home-syncthing-configuration-package config) "/bin/syncthing-gtk")
+ "--minimized"
+ #:log-file (format #f "~a/.local/var/log/syncthing.log" (getenv "HOME")))))
(stop
- #~(make-system-destructor
- #$(file-append (home-syncthing-configuration-package config) "/bin/syncthing-gtk")
- " --quit")))))
+ #~(make-kill-destructor)))))
(define home-syncthing-service-type
(service-type