-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_victron.sh
150 lines (137 loc) · 2.74 KB
/
setup_victron.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/bin/bash
# change this variable to match the tailescale latest version
TAILSCALE_VERSION="1.62.0"
TAILSCALE_TGZ="tailscale_""$TAILSCALE_VERSION""_arm.tgz"
clear
#
# move into home directory of the user root.
#
echo "move into home directory of the user root."
echo ""
cd /home/root
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# download the latest tailscale package.
#
echo "download the latest tailscale package."
echo ""
curl -o tailscale_loc.tgz https://pkgs.tailscale.com/stable/$TAILSCALE_TGZ
echo "done."
echo ""
sleep 1
echo $TAILSCALE_TGZ
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# uncompress the package.
#
echo "uncompress the package."
echo ""
tar -xvf tailscale_loc.tgz
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# copy the nessesary files to /usr/bin.
#
echo "copy the nessesary files to /usr/bin."
echo ""
cp /home/root/tailscale_"$TAILSCALE_VERSION"_arm/tailscale /home/root/tailscale_"$TAILSCALE_VERSION"_arm/tailscaled /usr/bin/
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# copy the nessesary file to /etc/init.d.
#
echo "copy the nessesary file to /etc/init.d."
echo ""
cp /home/root/tailscale_on_venus_os-master/etc/init.d/tailscaled /etc/init.d/
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# make init script executable
#
echo "make init script executable"
echo ""
chmod +x /etc/init.d/tailscaled
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# test the init script
#
echo "test the init script"
echo ""
/etc/init.d/tailscaled start
/etc/init.d/tailscaled stop
/etc/init.d/tailscaled start
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# configure tailscale init script to start automatically on boot
#
echo "configure tailscale init script to start automatically on boot"
echo ""
update-rc.d tailscaled defaults
echo "done."
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# enable ip-forward
#
echo "enable ip-forward"
echo ""
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
echo "done."
echo ""
sleep 1
echo "press any key to continue"
echo ""
read -s -n 1
clear
#
# connect to your tailscale account
# Theese settings are custom for my setup, change the ip address to match your system!
#
echo "connect to your tailscale account"
echo ""
echo 'run "tailscale up -ssh --advertise-routes=192.168.77.0/24"'
#
# if there was no errors, tailscale should be installed and ready!
#
echo "if there was no errors, tailscale should be installed and ready!"
echo ""