forked from DeskPi-Team/deskpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall-kali.sh
executable file
·26 lines (24 loc) · 1.15 KB
/
uninstall-kali.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
#!/bin/bash
# uninstall deskpi script
. /lib/lsb/init-functions
daemonname="deskpi"
deskpidaemon=/lib/systemd/system/$daemonname.service
safeshutdaemon=/lib/systemd/system/$daemonname-safeshut.service
log_action_msg "Uninstalling DeskPi PWM Fan Control and Safeshut Service."
sleep 1
log_action_msg "Diable DeskPi PWM Fan Control and Safeshut Service."
log_action_msg "Remove dtoverlay configure from /boot/config.txt file"
sudo sed -i '/dtoverlay=dwc2,dr_mode=host/d' /boot/config.txt
log_action_msg "Stop and disable DeskPi services"
sudo systemctl disable $daemonname.service 2&>/dev/null
sudo systemctl stop $daemonname.service 2&>/dev/null
sudo systemctl disable $daemonname-safeshut.service 2&>/dev/null
sudo systemctl stop $daemonname-safeshut.service 2&>/dev/null
log_action_msg "Remove DeskPi PWM Fan Control and Safeshut Service."
sudo rm -f $deskpidaemon 2&>/dev/null
sudo rm -f $safeshutdaemon 2&>/dev/null
sudo rm -f /usr/bin/fanStop 2&>/dev/null
sudo rm -f /usr/bin/pwmFanControl 2&>/dev/null
sudo rm -f /usr/bin/deskpi-config 2&>/dev/null
sudo rm -f /usr/bin/Deskpi-uninstall 2&>/dev/null
log_success_msg "Uninstall DeskPi Driver Successfully."