I want to install Resilio Sync in Debian, then create a user and connect a Key to a folder for synchronizing automatically.
I have read the artical https://help.resilio.com/hc/en-us/articles/206178924-Installing-Sync-package-on-Linux
I write the mybt.sh file, then upload it to hosting, then I run Code A to install Resilio Sync in Debian.
At present I have to create user and connect the Key FM2QC4IB4C43VNKE3OJC5OAVUJ2XFU6J1 to the folder /home/BTSync_XTem by accessing GUI http://35.233.17.45:8888 manually.
I hope that I can write some codes in mybt.sh file for creating a user and connecting the Key to the folder for synchronizing. I'm a beginner of Linux, how can I do it?
Code A
wget --no-check-certificate "https://www.dropbox.com/s/my/mybt.sh" && chmod +x mybt.sh && ./mybt.sh
mybt.sh
echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | sudo tee /etc/apt/sources.list.d/resilio-sync.list
wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | sudo apt-key add -
apt-get update
apt-get install resilio-sync
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/resilio-sync/config.json
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8888 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 8888 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 33333 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 33333 -j ACCEPT
service resilio-sync stop
service resilio-sync start
mkdir -m 777 /home/BTSync_XTemp
sudo systemctl enable resilio-sync