-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpi_setup.sh
executable file
·50 lines (34 loc) · 1.36 KB
/
rpi_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
sudo apt-get update
sudo apt-get install vim git tmux
echo "Now going to setup ssh key for git"
read -p "Press enter to continue"
# # setup ssh keys
# ssh-keygen -t rsa -b 4096 -C "[email protected]"
# ssh-add ~/.ssh/id_rsa
echo "Now setting up docker and docker-compose"
read -p "Press enter to continue"
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo su - ${USER}
docker version
echo "Docker should be installed. Now installing docker-compose"
read -p "Press enter to continue"
sudo apt-get -y install libffi-dev libssl-dev python3-dev python3 python3-pip
sudo pip3 install docker-compose
# syncthing and borgbackup
echo "Now going to install and setup syncthing"
read -p "Press enter to continue"
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing
syncthing
echo "Change address to 0.0.0.0:8384 in the ~/.config/syncthing/config.xml"
read -p "Press enter to continue"
sudo vim ~/.config/syncthing/config.xml
sudo wget https://raw.githubusercontent.com/syncthing/syncthing/master/etc/linux-systemd/system/syncthing%40.service -O /etc/systemd/user/[email protected]
sudo systemctl enable [email protected]
sudo reboot
# borgbackup