mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-23 07:18:07 +00:00
Add check for existing files in /usr/local/bin left over from previous version, as those scripts are replaced with pihole <command>
script.
This commit is contained in:
parent
97d3aedba1
commit
36645d9335
@ -488,6 +488,17 @@ installScripts() {
|
|||||||
$SUDO chmod 755 /usr/local/bin/pihole
|
$SUDO chmod 755 /usr/local/bin/pihole
|
||||||
$SUDO cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash_completion.d/pihole
|
$SUDO cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash_completion.d/pihole
|
||||||
. /etc/bash_completion.d/pihole
|
. /etc/bash_completion.d/pihole
|
||||||
|
|
||||||
|
#Tidy up /usr/local/bin directory if installing over previous install.
|
||||||
|
oldFiles=( gravity chronometer whitelist blacklist piholeLogFlush updateDashboard uninstall setupLCD piholeDebug)
|
||||||
|
for i in "${oldFiles[@]}"
|
||||||
|
do
|
||||||
|
:
|
||||||
|
if [ -f "/usr/local/bin/$i.sh" ]; then
|
||||||
|
$SUDO rm /usr/local/bin/$i.sh
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
$SUDO echo " done."
|
$SUDO echo " done."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user