mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +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
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue