mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Minor changes to reflect new tool usage
Removed symlink of scripts to u/l/b Added copy for setupLCD to /opt/pihole/ New spinner added to gravity.sh to reflect new spinner in basic-install.sh and uninstall.sh
This commit is contained in:
parent
fee55fa642
commit
00b65abd09
@ -93,7 +93,7 @@ backupLegacyPihole() {
|
|||||||
if [ ! -d /opt/pihole ]; then
|
if [ ! -d /opt/pihole ]; then
|
||||||
$SUDO mkdir /opt/pihole
|
$SUDO mkdir /opt/pihole
|
||||||
$SUDO chown "$USER":root /opt/pihole
|
$SUDO chown "$USER":root /opt/pihole
|
||||||
$SUDO chmod 1766 /opt/pihole
|
$SUDO chmod u+srwx /opt/pihole
|
||||||
fi
|
fi
|
||||||
$SUDO mv /opt/pihole/gravity.sh /etc/pihole/original/gravity.sh."$(date "+%Y-%m-%d")"
|
$SUDO mv /opt/pihole/gravity.sh /etc/pihole/original/gravity.sh."$(date "+%Y-%m-%d")"
|
||||||
else
|
else
|
||||||
@ -481,11 +481,8 @@ installScripts() {
|
|||||||
$SUDO cp /etc/.pihole/advanced/Scripts/piholeLogFlush.sh /opt/pihole/piholeLogFlush.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/advanced/Scripts/updateDashboard.sh /opt/pihole/updateDashboard.sh
|
||||||
$SUDO cp /etc/.pihole/automated\ install/uninstall.sh /opt/pihole/uninstall.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
|
$SUDO cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh
|
||||||
for f in /opt/pihole/*; do
|
$SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,uninstall,setupLCD}.sh
|
||||||
filename=${f##*/}
|
|
||||||
$SUDO ln -s /opt/pihole/"$filename" /usr/local/bin/"$filename"
|
|
||||||
done
|
|
||||||
$SUDO echo " done."
|
$SUDO echo " done."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,14 +114,6 @@ function removeNoPurge {
|
|||||||
$SUDO mv /etc/lighttpd/lighttpd.conf.orig /etc/lighttpd/lighttpd.conf
|
$SUDO mv /etc/lighttpd/lighttpd.conf.orig /etc/lighttpd/lighttpd.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$SUDO rm /usr/local/bin/gravity.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/chronometer.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/whitelist.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/blacklist.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/piholeLogFlush.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/piholeDebug.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/updateDashboard.sh &> /dev/null
|
|
||||||
$SUDO rm /usr/local/bin/uninstall.sh &> /dev/null
|
|
||||||
$SUDO rm /etc/dnsmasq.d/adList.conf &> /dev/null
|
$SUDO rm /etc/dnsmasq.d/adList.conf &> /dev/null
|
||||||
$SUDO rm -rf /var/log/*pihole* &> /dev/null
|
$SUDO rm -rf /var/log/*pihole* &> /dev/null
|
||||||
$SUDO rm -rf /etc/pihole/ &> /dev/null
|
$SUDO rm -rf /etc/pihole/ &> /dev/null
|
||||||
|
21
gravity.sh
21
gravity.sh
@ -75,18 +75,19 @@ if [[ -r $piholeDir/pihole.conf ]];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
spinner(){
|
spinner()
|
||||||
|
{
|
||||||
local pid=$1
|
local pid=$1
|
||||||
|
local delay=0.50
|
||||||
spin='-\|/'
|
local spinstr='|/-\'
|
||||||
i=0
|
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do
|
||||||
while $SUDO kill -0 "$pid" 2>/dev/null
|
local temp=${spinstr#?}
|
||||||
do
|
printf " [%c] " "$spinstr"
|
||||||
i=$(( (i+1) %4 ))
|
local spinstr=$temp${spinstr%"$temp"}
|
||||||
printf "\b%s" "${spin:$i:1}"
|
sleep $delay
|
||||||
sleep .1
|
printf "\b\b\b\b\b\b"
|
||||||
done
|
done
|
||||||
printf "\b"
|
printf " \b\b\b\b"
|
||||||
}
|
}
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
Loading…
Reference in New Issue
Block a user