mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +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
3 changed files with 17 additions and 27 deletions
|
@ -93,8 +93,8 @@ backupLegacyPihole() {
|
|||
if [ ! -d /opt/pihole ]; then
|
||||
$SUDO mkdir /opt/pihole
|
||||
$SUDO chown "$USER":root /opt/pihole
|
||||
$SUDO chmod 1766 /opt/pihole
|
||||
fi
|
||||
$SUDO chmod u+srwx /opt/pihole
|
||||
fi
|
||||
$SUDO mv /opt/pihole/gravity.sh /etc/pihole/original/gravity.sh."$(date "+%Y-%m-%d")"
|
||||
else
|
||||
:
|
||||
|
@ -481,11 +481,8 @@ installScripts() {
|
|||
$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
|
||||
filename=${f##*/}
|
||||
$SUDO ln -s /opt/pihole/"$filename" /usr/local/bin/"$filename"
|
||||
done
|
||||
$SUDO cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh
|
||||
$SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,uninstall,setupLCD}.sh
|
||||
$SUDO echo " done."
|
||||
}
|
||||
|
||||
|
|
|
@ -114,14 +114,6 @@ function removeNoPurge {
|
|||
$SUDO mv /etc/lighttpd/lighttpd.conf.orig /etc/lighttpd/lighttpd.conf
|
||||
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 -rf /var/log/*pihole* &> /dev/null
|
||||
$SUDO rm -rf /etc/pihole/ &> /dev/null
|
||||
|
|
25
gravity.sh
25
gravity.sh
|
@ -75,18 +75,19 @@ if [[ -r $piholeDir/pihole.conf ]];then
|
|||
fi
|
||||
|
||||
|
||||
spinner(){
|
||||
local pid=$1
|
||||
|
||||
spin='-\|/'
|
||||
i=0
|
||||
while $SUDO kill -0 "$pid" 2>/dev/null
|
||||
do
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\b%s" "${spin:$i:1}"
|
||||
sleep .1
|
||||
done
|
||||
printf "\b"
|
||||
spinner()
|
||||
{
|
||||
local pid=$1
|
||||
local delay=0.50
|
||||
local spinstr='|/-\'
|
||||
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do
|
||||
local temp=${spinstr#?}
|
||||
printf " [%c] " "$spinstr"
|
||||
local spinstr=$temp${spinstr%"$temp"}
|
||||
sleep $delay
|
||||
printf "\b\b\b\b\b\b"
|
||||
done
|
||||
printf " \b\b\b\b"
|
||||
}
|
||||
|
||||
###########################
|
||||
|
|
Loading…
Reference in a new issue