How to set automatic startup in freenas jails
/etc/rc.d/syncthing
#!/bin/sh
. /etc/rc.subr
name="syncthing"
command="/usr/bin/syncthing"
pidfile="/var/run/${name}.pid"
load_rc_config $name
run_rc_command "$1"
service syncthing start
Starting syncthing.
[monitor] 10:37:41 INFO: Starting syncthing
[start] 10:37:41 INFO: syncthing v1.3.1-rc.2 "Fermium Flea" (go1.13.3 freebsd-amd64) teamcity@build.syncthing.net 2019-10-07 11:30:25 UTC
[start] 10:37:41 WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
[monitor] 10:37:41 INFO: Syncthing exited: exit status 1
....
[monitor] 10:37:44 INFO: Starting syncthing
[start] 10:37:44 INFO: syncthing v1.3.1-rc.2 "Fermium Flea" (go1.13.3 freebsd-amd64) teamcity@build.syncthing.net 2019-10-07 11:30:25 UTC
[start] 10:37:44 WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
[monitor] 10:37:44 INFO: Syncthing exited: exit status 1
[monitor] 10:37:45 WARNING: 4 restarts in 4.299149991s; not retrying further
/etc/rc.d/syncthing: WARNING: failed to start syncthing`Preformatted text`