Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Syncthing service scripts require changes to work with 2.0 (Read 1658 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Syncthing service scripts require changes to work with 2.0

The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script:
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 "-". 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.

Re: Syncthing service scripts require changes to work with 2.0

Reply #1
Updated, thanks.

Re: Syncthing service scripts require changes to work with 2.0

Reply #2
The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script:
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 "-". 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?

Re: Syncthing service scripts require changes to work with 2.0

Reply #3
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

Re: Syncthing service scripts require changes to work with 2.0

Reply #4
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.

Re: Syncthing service scripts require changes to work with 2.0

Reply #5
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! :)

 

Re: Syncthing service scripts require changes to work with 2.0

Reply #6
It seems the script in the syncthing-runit package still uses the incompatible options.