Adding uninstall.sh script, related to the issue #7

This commit is contained in:
Félix Aime 2020-12-29 10:51:41 +01:00
parent 42727f5eec
commit 7b49e4ce08

33
uninstall.sh Normal file
View File

@ -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