-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuninstall.sh
39 lines (32 loc) · 913 Bytes
/
uninstall.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
#!/bin/bash
# Uninstall x729-fan.service:
sudo systemctl stop x729-fan
sudo systemctl disable x729-fan
file_path="/lib/systemd/system/x729-fan.service"
if [ -f "$file_path" ]; then
sudo rm -f "$file_path"
fi
file_path="/usr/local/bin/x729-fan.sh"
if [ -f "$file_path" ]; then
sudo rm -f "$file_path"
fi
# Uninstall x729 installation script
sudo systemctl stop x729-pwr
sudo systemctl disable x729-pwr
file_path="/lib/systemd/system/x729-pwr.service"
if [ -f "$file_path" ]; then
sudo rm -f "$file_path"
fi
file_path="/usr/local/bin/xPWR.sh"
if [ -f "$file_path" ]; then
sudo rm -f "$file_path"
fi
# Remove the xoff allias on .bashrc file
sudo sed -i '/x729off/d' ~/.bashrc
source ~/.bashrc
file_path="/usr/local/bin/xSoft.sh"
if [ -f "$file_path" ]; then
sudo rm -f "$file_path"
fi
# Remove the configuratoin of config.txt
sudo sed -i '/dtoverlay=pwm-2chan/d' /boot/firmware/config.txt