From cdf1406abac21e491a2be35b2f4780ae7f512ede Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 24 Jun 2019 21:42:15 +0000 Subject: [PATCH] Added prompt to remove installed packages. Resolves #336 --- installers/uninstall.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/installers/uninstall.sh b/installers/uninstall.sh index bcf74c1f..ecc88e7a 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -120,6 +120,20 @@ function remove_raspap_directories() { } +# Removes installed packages +function remove_installed_packages() { + install_log "Removing installed packages" + echo -n "Remove the following installed packages? lighttpd $php_package git hostapd dnsmasq vnstat [y/N]: " + read answer + if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then + echo "Removing packages." + sudo apt-get remove lighttpd $php_package git hostapd dnsmasq vnstat + sudo apt-get autoremove + else + echo "Leaving packages installed." + fi +} + # Removes www-data from sudoers function clean_sudoers() { # should this check for only our commands? @@ -130,6 +144,7 @@ function remove_raspap() { config_uninstallation check_for_backups remove_raspap_directories + remove_installed_packages clean_sudoers }