From 7b49e4ce0881ff3801d02d59dc2b3018b057b242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Tue, 29 Dec 2020 10:51:41 +0100 Subject: [PATCH] Adding uninstall.sh script, related to the issue #7 --- uninstall.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..e74868e --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,33 @@ +# Checking rights. +if [[ $EUID -ne 0 ]]; then + echo "The update must be run as root. Type in 'sudo bash $0' to run it as root." + exit 1 +else + + echo "[+] Deleting TinyCheck folders" + + rm -rf /usr/share/tinycheck/ + + echo "[+] Deleting TinyCheck services" + + systemctl disable tinycheck-frontend + systemctl disable tinycheck-backend + systemctl disable tinycheck-kiosk + systemctl disable tinycheck-watchers + + rm /lib/systemd/system/tinycheck-frontend.service + rm /lib/systemd/system/tinycheck-backend.service + rm /lib/systemd/system/tinycheck-kiosk.service + rm /lib/systemd/system/tinycheck-watchers.service + + echo "[+] Updating dnsmasq and dhcpcd configuration files" + + sed -i '/## TinyCheck configuration ##/,$d' /etc/dnsmasq.conf + sed -i '/## TinyCheck configuration ##/,$d' /etc/dhcpcd.conf + + echo "[+] Deleting desktop icon" + + rm "/home/${SUDO_USER}/Desktop/tinycheck.desktop" + + echo "[+] TinyCheck uninstalled!" +fi \ No newline at end of file