mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Update pialert_uninstall.sh
This commit is contained in:
@@ -31,32 +31,32 @@ main() {
|
|||||||
log "Logfile: $LOG"
|
log "Logfile: $LOG"
|
||||||
|
|
||||||
# Ask uninstallation
|
# Ask uninstallation
|
||||||
ask_yesno "This script will uninstall Pi.Alert from this system.\nInstallation path: $PIALERT_HOME" \
|
ask_yesno "This script will uninstall Pi.Alert from this system.\nUninstall path: $PIALERT_HOME" \
|
||||||
"Do you want to continue ?"
|
"Do you want to continue ?"
|
||||||
if ! $ANSWER ; then
|
if ! $ANSWER ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msgbox "" "The uninstallation will start now"
|
msgbox "" "The uninstallation process will start now"
|
||||||
|
|
||||||
# Uninstall prrocess
|
# Uninstall prrocess
|
||||||
print_header "Removing files"
|
print_header "Removing files"
|
||||||
# sudo rm -r "$PIALERT_HOME"
|
sudo rm -r "$PIALERT_HOME"
|
||||||
# sudo rm "$LIGHTTPD_CONF_DIR/pialert"
|
sudo rm "$LIGHTTPD_CONF_DIR/pialert"
|
||||||
# sudo rm "$LIGHTTPD_CONF_DIR/conf-available/pialert_front.conf"
|
sudo rm "$LIGHTTPD_CONF_DIR/conf-available/pialert_front.conf"
|
||||||
# sudo rm "$LIGHTTPD_CONF_DIR/conf-enabled/pialert_front.conf"
|
sudo rm "$LIGHTTPD_CONF_DIR/conf-enabled/pialert_front.conf"
|
||||||
# sudo rm -r /var/cache/lighttpd/compress/pialert
|
sudo rm -r /var/cache/lighttpd/compress/pialert
|
||||||
|
|
||||||
# Removing
|
# Removing
|
||||||
print_header "Removing Pi.Alert DNS name"
|
print_header "Removing Pi.Alert DNS name"
|
||||||
if [ -f /etc/pihole/custom.list ] ; then
|
if [ -f /etc/pihole/custom.list ] ; then
|
||||||
# sudo sed -i '/pi.alert/d' /etc/pihole/custom.list 2>&1 >> "$LOG"
|
sudo sed -i '/pi.alert/d' /etc/pihole/custom.list 2>&1 >> "$LOG"
|
||||||
sudo pihole restartdns 2>&1 >> "$LOG"
|
sudo pihole restartdns 2>&1 >> "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Uninstall crontab jobs
|
# Uninstall crontab jobs
|
||||||
print_header "Removing crontab jobs"
|
print_header "Removing crontab jobs"
|
||||||
# crontab -l 2>/dev/null | sed '/pialert.py/d' | sed ':a;N;$!ba;s/#-------------------------------------------------------------------------------\n# Pi.Alert\n# Open Source Network Guard \/ WIFI & LAN intrusion detector \n#\n# pialert.cron - Back module. Crontab jobs\n#-------------------------------------------------------------------------------\n# Puche 2021 pi.alert.application@gmail.com GNU GPLv3\n#-------------------------------------------------------------------------------//g' | crontab -
|
crontab -l 2>/dev/null | sed '/pialert.py/d' | sed ':a;N;$!ba;s/#-------------------------------------------------------------------------------\n# Pi.Alert\n# Open Source Network Guard \/ WIFI & LAN intrusion detector \n#\n# pialert.cron - Back module. Crontab jobs\n#-------------------------------------------------------------------------------\n# Puche 2021 pi.alert.application@gmail.com GNU GPLv3\n#-------------------------------------------------------------------------------//g' | crontab -
|
||||||
|
|
||||||
# final message
|
# final message
|
||||||
print_header "Uninstallation process finished"
|
print_header "Uninstallation process finished"
|
||||||
|
|||||||
Reference in New Issue
Block a user