-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
61 lines (52 loc) · 1.4 KB
/
install.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
sudo apt update -y
sudo apt upgrade -y
sudo apt install mc -y
sudo apt install htop -y
sudo apt install fping -y
sudo apt install gpsd -y
sudo apt install jq -y
sudo tailscale up
sudo apt install ffmpeg -y
sudo sed -i -e 's/GPSD_OPTIONS=""/GPSD_OPTIONS="\/dev\/ttyACM0"/g' /etc/default/gpsd
#sudo gpsd /dev/serial0 -F /var/run/gpsd.sock
#curl -fsSL https://tailscale.com/install.sh | sh
wget https://raw.githubusercontent.com/ClanHost/DashCam_Tracker/refs/heads/main/GPS.sh
wget https://raw.githubusercontent.com/ClanHost/DashCam_Tracker/refs/heads/main/DASHCAM.sh
mkdir /home/pi/DASHCAM
chmod 777 /home/pi/GPS.sh
chmod 777 /home/pi/DASHCAM.sh
sudo touch /etc/systemd/system/GPS.service
sudo touch /etc/systemd/system/DASHCAM.service
sudo echo "
[Unit]
Description = GPS
Requires = systemd-user-sessions.service network.target sound.target
After = multi-user.target
[Service]
User = pi
Group = pi
Type = simple
ExecStart = /home/pi/GPS.sh
Restart = always
RestartSec = 5
[Install]
WantedBy=multi-user.target"
sudo systemctl enable GPS
sudo systemctl restart GPS
sudo echo "
[Unit]
Description = DASHCAM
Requires = systemd-user-sessions.service network.target sound.target
After = multi-user.target
[Service]
User = pi
Group = pi
Type = simple
ExecStart = /home/pi/DASHCAM.sh
Restart = always
RestartSec = 5
[Install]
WantedBy=multi-user.target"
sudo systemctl enable DASHCAM
sudo systemctl restart DASHCAM
sudo reboot