39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
apt update
|
|
apt install curl -y
|
|
|
|
echo "> Installing Docker"
|
|
curl -fsSL https://get.docker.com -o get-docker.sh
|
|
sh get-docker.sh
|
|
docker run hello-world
|
|
|
|
echo "> Installing tailscale"
|
|
curl -fsSL https://tailscale.com/install.sh | sh
|
|
|
|
echo Installing Syncthing
|
|
apt update
|
|
apt install syncthing -y
|
|
|
|
# Update the systemd service to use root
|
|
# I think a better way exists but idk
|
|
echo Updating systemd service to run as root
|
|
cp /usr/lib/systemd/system/syncthing@.service ~/syncthing.service
|
|
sed -i 's/%i/root/' ~/syncthing.service
|
|
cp ~/syncthing.service /usr/lib/systemd/system/syncthing.service
|
|
rm ~/syncthing.service
|
|
|
|
echo "Generating Syncthing config"
|
|
syncthing generate
|
|
|
|
# Allow access to the portal and api
|
|
echo Allowing access to the portal and api
|
|
cp ~/.config/syncthing/config.xml ~/.config/syncthing/config.backup.xml
|
|
sed -i 's/127.0.0.1:8384/0.0.0.0:8384/' ~/.config/syncthing/config.xml
|
|
|
|
echo enabling systemd service
|
|
systemctl daemon-reload
|
|
systemctl enable syncthing
|
|
systemctl start syncthing
|
|
|
|
echo service should now be running!
|
|
echo Syncthing web should now be available from ::8384
|
|
echo You can always run 'systemcld status syncthing' to see how its going |