Hello Syncthers.
First of all, sorry If I should post this on the OpenWRT forum instead of the Syncthing one, as I cannot address the origin of the issue.
I have downloaded latest (0.14.49) Syncthing ARM from official site, installed to my LEDE 17.01.05 Linksys WRT1900ACS router, launched from SSH console, configured it via config.xml to be accesible from any IP address (0.0.0.0:8384) and everything works great.
Now, I would like to make it to autostart everytime the router gets rebooted, so I found an autostart script from a repository at “GitHub - brglng/syncthing-openwrt: Init script and usage for ARM based OpenWrt devices.”, placed on “/etc/init.d/” and launched the command “/etc/init.d/syncthing enable”.
The problem is that now whenever I reboot, the GUI cannot be accessed at port 8384 (it gives a 404 error) like when I manually launch it. And when I try to launch it manually, it stops because it detects that the service is already in use (?):
09:10:25 FATAL: Starting API/GUI: listen tcp 0.0.0.0:8384: bind: address already in use 09:10:25 INFO: Syncthing exited: exit status 1
I have to manually delete the autostart script and disable it so I can manualy launch Syncthing again from SSH console.
I guess the autostart script is outdated (+3 years ago) and there is some conflict but my UNIX knowledge is very poor as you can see. The code seems pretty simple, though:
START=99 STOP=99
start() { service_start /usr/bin/syncthing 2>&1 | logger -t syncthing & }
stop() { service_stop /usr/bin/syncthing }
Is any other way to make it to autostart whenever the router is on?
Thanks in advance.