diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 870de00c..dd5aa3a1 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -472,18 +472,19 @@ installScripts() { if [ ! -d /opt/pihole ]; then $SUDO mkdir /opt/pihole $SUDO chown "$USER":root /opt/pihole - $SUDO chmod 1766 /opt/pihole + $SUDO chmod u+srwx /opt/pihole fi $SUDO cp /etc/.pihole/gravity.sh /opt/pihole/gravity.sh $SUDO cp /etc/.pihole/advanced/Scripts/chronometer.sh /opt/pihole/chronometer.sh $SUDO cp /etc/.pihole/advanced/Scripts/whitelist.sh /opt/pihole/whitelist.sh - $SUDO cp /etc/.pihole/advanced/Scripts/blacklist.sh /opt/pihole/bin/blacklist.sh + $SUDO cp /etc/.pihole/advanced/Scripts/blacklist.sh /opt/pihole/blacklist.sh $SUDO cp /etc/.pihole/advanced/Scripts/piholeLogFlush.sh /opt/pihole/piholeLogFlush.sh $SUDO cp /etc/.pihole/advanced/Scripts/updateDashboard.sh /opt/pihole/updateDashboard.sh $SUDO cp /etc/.pihole/automated\ install/uninstall.sh /opt/pihole/uninstall.sh $SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,uninstall}.sh for f in /opt/pihole/*; do - $SUDO ln -s /opt/pihole/"$f" /usr/local/bin/"$f" + filename=${f##*/} + $SUDO ln -s /opt/pihole/"$filename" /usr/local/bin/"$filename" done $SUDO echo " done." } diff --git a/automated install/uninstall.sh b/automated install/uninstall.sh index a08a9900..ef82fa07 100755 --- a/automated install/uninstall.sh +++ b/automated install/uninstall.sh @@ -50,7 +50,7 @@ echo ":::" while true; do read -rp "::: Do you wish to remove $i from your system? [y/n]: " yn case $yn in - [Yy]* ) printf ":::\tRemoving %s..." "$i"; $SUDO apt-get -y remove --purge "$i" &> /dev/null & spinner $!; printf "DONE!\n"; break;; + [Yy]* ) printf ":::\tRemoving %s..." "$i"; $SUDO apt-get -y remove --purge "$i" &> /dev/null & spinner $!; printf "done!\n"; break;; [Nn]* ) printf ":::\tSkipping %s" "$i"; break;; * ) printf "::: You must answer yes or no!";; esac @@ -65,10 +65,10 @@ echo ":::" $SUDO rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig /etc/dnsmasq.d/01-pihole.conf &> /dev/null # Take care of any additional package cleaning - printf "::: Auto removing remaining dependencies" - $SUDO apt-get -y autoremove &> /dev/null & spinner $!; printf "DONE!\n"; - printf "::: Auto cleaning remaining dependencies" - $SUDO apt-get -y autoclean &> /dev/null & spinner $!; printf "DONE!\n"; + printf "::: Auto removing remaining dependencies..." + $SUDO apt-get -y autoremove &> /dev/null & spinner $!; printf "done!\n"; + printf "::: Auto cleaning remaining dependencies..." + $SUDO apt-get -y autoclean &> /dev/null & spinner $!; printf "done!\n"; # Call removeNoPurge to remove PiHole specific files removeNoPurge @@ -124,14 +124,14 @@ function removeNoPurge { printf "::: Finished removing PiHole from your system. Sorry to see you go!\n" printf "::: Reach out to us at https://github.com/pi-hole/pi-hole/issues if you need help\n" printf "::: Reinstall by simpling running\n:::\n:::\tcurl -L install.pi-hole.net | bash\n:::\n::: at any time!\n:::\n" - printf "::: PLEASE RESET YOUR DNS ON YOUR ROUTER/CLIENTS TO RESTORE INTERNET CONNECTIVITY!/n" + printf "::: PLEASE RESET YOUR DNS ON YOUR ROUTER/CLIENTS TO RESTORE INTERNET CONNECTIVITY!\n" } ######### SCRIPT ########### echo "::: Preparing to remove packages, be sure that each may be safely removed depending on your operating system." echo "::: (SAFE TO REMOVE ALL ON RASPBIAN)" while true; do - read -rp "::: Do you wish to purge PiHole's dependencies from your OS? (You will be prompted for each package) [y/n]" yn + read -rp "::: Do you wish to purge PiHole's dependencies from your OS? (You will be prompted for each package) [y/n]: " yn case $yn in [Yy]* ) removeAndPurge; break;;