uid.gidは旧pkgに合わせましたが、任意で大丈夫です
# pw add group -g 983 -n syncthing
defaultではここで指定した/Syncthing配下にdefault folder “Sync” が作成されます
# pw add user -n syncthing -u 983 -g syncthing -d /Syncthing -s /usr/sbin/nologin -c 'Syncthing Daemon' # mkdir /Syncthing # chown syncthing:syncthing /Syncthing
ダウンロードは本家から行いました
# cd /path/to/tmp/ # curl -LO https://github.com/syncthing/syncthing/releases/download/v1.29.4/syncthing-freebsd-amd64-v1.29.4.tar.gz # tar -xzf syncthing-freebsd-amd64-v1.29.4.tar.gz
# cd /path/to/tmp/syncthing-freebsd-amd64-v1.29.4 # cp syncthing /usr/local/bin/ # chown syncthing:syncthing /usr/local/bin/syncthing
config dir作成
# mkdir /usr/local/etc/syncthing/ # chown syncthing:syncthing /usr/local/etc/syncthing/ # chmod 600 /usr/local/etc/syncthing/
/usr/local/etc/rc.d/作成
# mkdir /usr/local/etc/rc.d/
/usr/local/etc/rc.d/syncthing 3)の作成
# cp etc/freebsd-rc/syncthing /usr/local/etc/rc.d/ # chmod 755 /usr/local/etc/rc.d/syncthing
permission変更
# chmod 555 /usr/local/etc/rc.d/syncthing
/usr/local/etc/rc.conf.d/syncthing 4)の作成
syncthing_enable=YES # Optional configuration options are: # syncthing_home=</path/to/syncthing/config/dir> # syncthing_log_file=</path/to/syncthing/log/file> # syncthing_user=<syncthing_user> # syncthing_group=<syncthing_group>
後はpkgで作成した場合と同じです
# pkg install syncthing
# cat /etc/rc.conf.local syncthing_enable=YES
# service syncthing start
/usr/local/etc/syncthing/config.xml
<gui enabled="true" tls="false" debugging="false"> <address>127.0.0.1:8384</address> ↓ <gui enabled="true" tls="false" debugging="false"> <address>0.0.0.0:8384</address>
Chocolateyでインストール5)
> choco install synctrayzor
あれ、動かない
[monitor] 10:10:10 INFO: Log output saved to file "C:\Users\xxxxxxxx\AppData\Local\Syncthing\syncthing.log" [start] 10:10:10 INFO: syncthing v1.18.1 "Fermium Flea" (go1.16.6 windows-amd64) teamcity@build.syncthing.net ... [start] 10:10:10 WARNING: Failed to initialize config: config file version (37) is newer than supported version (35). If this is expected, use -allow-newer-config to ove
先に単体のsyncthingを動かしたんだが、そこで作られた設定ファイルの方がバージョンが新しいので起動しなかった模様
サクッと当該フォルダの中消して立ち上げたら大丈夫だった