moving my init script to a public repo because lazy
This commit is contained in:
parent
888bbf24b3
commit
a908281602
39
lxc-init.sh
Normal file
39
lxc-init.sh
Normal file
@ -0,0 +1,39 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user