diff mbox series

[bug#65731] services: syncthing: ensure that service runs after mounting home directories

Message ID 87il8q3z2k.fsf@aol.com
State New
Headers show
Series [bug#65731] services: syncthing: ensure that service runs after mounting home directories | expand

Commit Message

Adam Maleszka Sept. 4, 2023, 12:25 p.m. UTC
Sometimes `syncthing-service-type' fails during startup because it tries
to read configuration files from the user's home directory:

Failure on home directory: mkdir /home/xyz/.config: permission denied

This patch adds `user-processes' to the shepherd service requirements to
ensure that `user-homes' is fired before `syncthing' tries to read data
from the home directory.

* gnu/services/syncthing.scm (syncthing-shepherd-service): add
`user-processes' to requirements

---
 gnu/services/syncthing.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ludovic Courtès Sept. 17, 2023, 9:56 a.m. UTC | #1
Hi,

Adam Maleszka <adam_maleszka@aol.com> skribis:

> Sometimes `syncthing-service-type' fails during startup because it tries
> to read configuration files from the user's home directory:
>
> Failure on home directory: mkdir /home/xyz/.config: permission denied
>
> This patch adds `user-processes' to the shepherd service requirements to
> ensure that `user-homes' is fired before `syncthing' tries to read data
> from the home directory.
>
> * gnu/services/syncthing.scm (syncthing-shepherd-service): add
> `user-processes' to requirements

Applied, thanks!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
index 2f7c822827..9bb623186b 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -63,7 +63,7 @@  (define syncthing-shepherd-service
                      (list (string->symbol
                             (string-append "syncthing-" user)))))
       (documentation "Run syncthing.")
-      (requirement (if home-service? '() '(loopback)))
+      (requirement (if home-service? '() '(loopback user-processes)))
       (start #~(make-forkexec-constructor
                 (append (list (string-append #$syncthing "/bin/syncthing")
                               "--no-browser"