-
Notifications
You must be signed in to change notification settings - Fork 24
/
uninstall.sh
31 lines (25 loc) · 1.02 KB
/
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
interfaceWifi=wlan0
interfaceWired=eth0
### Check if run as root ############################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
echo "Try \"sudo $0\""
exit 1
fi
systemctl disable systemd-networkd.service systemd-resolved.service
apt-mark unhold ifupdown dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog raspberrypi-net-mods openresolv avahi-daemon libnss-mdns
rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apt install -y ifupdown dhcpcd5 isc-dhcp-client rsyslog avahi-daemon
apt purge --autoremove -y libnss-resolve
# Remove the wpa_cli script an disable wpa_cli.service
rm /usr/local/sbin/auto-hotspot
systemctl disable [email protected] #If your device is named »wlan0«
# Remove all config files
rm /etc/systemd/network/04-${interfaceWired}.network
rm /etc/systemd/network/08-${interfaceWifi}-CLI.network
rm /etc/systemd/network/12-${interfaceWifi}-AP.network
rm /etc/systemd/network/12-${interfaceWifi}-AP.network
echo "Uninstalled auto-hotspot"
echo "Reboot now!"
exit 0