Artix Linux Forum

Artix Linux => System => Topic started by: louka on 13 August 2025, 19:09:23

Title: Syncthing service scripts require changes to work with 2.0
Post by: louka on 13 August 2025, 19:09:23
The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script (https://gitea.artixlinux.org/packages/syncthing-openrc/src/branch/master/syncthing.initd):
Code: [Select]
command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"
However, as of 2.0, options such as "no-browser" must be prefixed with "--" instead of a single "-" (https://github.com/syncthing/syncthing/releases/tag/v2.0.0). Without the double dashes, syncthing fails to launch. I manually edited the service script on my end to fix the issue but the script must be updated. I would have submitted a PR myself but I don't think I can create an account as a non-collaborator.
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: nous on 13 August 2025, 23:52:22
Updated, thanks.
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: mrbrklyn on 14 August 2025, 04:12:46
The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script (https://gitea.artixlinux.org/packages/syncthing-openrc/src/branch/master/syncthing.initd):
Code: [Select]
command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"
However, as of 2.0, options such as "no-browser" must be prefixed with "--" instead of a single "-" (https://github.com/syncthing/syncthing/releases/tag/v2.0.0). Without the double dashes, syncthing fails to launch. I manually edited the service script on my end to fix the issue but the script must be updated. I would have submitted a PR myself but I don't think I can create an account as a non-collaborator.

Question - what is syncing?
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: MaxLPM on 14 August 2025, 08:53:56
Unfortunately, the update didn't fix it for me :( (tested on my setup and on a mostly-clean VM)
On both systems, this is the result:
Code: [Select]
rc-service syncthing start
 * WARNING: syncthing is already starting
rc-service syncthing stop
 * ERROR: syncthing stopped by something else
rc-service syncthing status
 * status: stopped
But launching syncthing manually (from a terminal) works as expected.
Also, logging to /var/log/syncthing/ stopped for some reason. Are there any other logs I can provide in order to help?
Related thread: https://forum.artixlinux.org/index.php/topic,8540.msg51336.html
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: nous on 14 August 2025, 18:06:36
Unfortunately, the update didn't fix it for me :( (tested on my setup and on a mostly-clean VM)
I've noticed some weird behavior in OpenRC scripts; sometimes, when the service script changes and the daemon is already running, OpenRC can't control the daemon correctly. Try to pkill all syncthing processes and retry, this fixed it for me.
A very neat software to keep files and directories synced across devices which can equally well serve as a backup solution.
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: MaxLPM on 14 August 2025, 19:17:54
Oops, actually, it was a very stupid mistake on my part. I forgot that rc-service requires sudo. Don't know how I missed that :P
Running "sudo rc-service syncthing start" after a reboot worked, thank you! :)
Title: Re: Syncthing service scripts require changes to work with 2.0
Post by: dkaparis on 20 August 2025, 18:55:17
It seems the script in the syncthing-runit package still uses the incompatible options.