Updated Syncthing Script

This commit is contained in:
Phil 2022-05-29 13:06:29 +01:00
parent 15e98dc461
commit 83ec53a721

View File

@ -12,16 +12,6 @@ syncthingversion=$(curl --silent "https://api.github.com/repos/syncthing/syncthi
#Setup Syncthing User
adduser \
--system \
--shell /bin/bash \
--gecos 'Syncthing Client' \
--group \
--disabled-password \
--home /opt/syncthing/config \
git
# Setup Folders
sudo mkdir /opt/syncthing
sudo chown syncthing -R /opt/syncthing
@ -31,6 +21,16 @@ mkdir /opt/syncthing/config
mkdir /opt/syncthing/bin
mkdir /opt/syncthing/bin/current
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'Syncthing Client' \
--group \
--disabled-password \
--home /opt/syncthing/config \
syncthing
# Get Syncthing and setup
cd /opt/syncthing/bin
wget https://github.com/syncthing/syncthing/releases/download/$(echo $syncthingversion)/syncthing-linux-amd64-$(echo $syncthingversion).tar.gz
@ -55,9 +55,9 @@ command = /usr/local/bin/syncthing -no-browser -logflags=0 -gui-address=$ip:8384
environment = STNORESTART="1", HOME="/opt/syncthing/config/"
EOF'
sudo service supervisor restart
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl reload
echo "If everything installed with no errors"
echo "Please go to http://$ip:8384"