mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-01 02:23:21 +00:00
Copy some scripts from basic_install.sh. Add todo list comments.
This commit is contained in:
parent
5b0e73c9f3
commit
67834062bc
1 changed files with 52 additions and 2 deletions
|
@ -42,12 +42,62 @@ function updateDependencies(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stopServices() {
|
||||||
|
# Stop dnsmasq and lighttpd
|
||||||
|
echo ":::"
|
||||||
|
echo -n "::: Stopping services..."
|
||||||
|
$SUDO service lighttpd stop
|
||||||
|
echo " done."
|
||||||
|
}
|
||||||
|
|
||||||
|
installScripts() {
|
||||||
|
# Install the scripts from /etc/.pihole to their various locations
|
||||||
|
echo ":::"
|
||||||
|
echo -n "::: Updating scripts in /opt/pihole..."
|
||||||
|
|
||||||
|
$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/blacklist.sh
|
||||||
|
$SUDO cp /etc/.pihole/advanced/Scripts/piholeDebug.sh /opt/pihole/piholeDebug.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/updatePihole.sh /opt/pihole/updatePihole.sh
|
||||||
|
$SUDO cp /etc/.pihole/advanced/Scripts/updatePiholeSecondary.sh /opt/pihole/updatePiholeSecondary.sh
|
||||||
|
$SUDO cp /etc/.pihole/automated\ install/uninstall.sh /opt/pihole/uninstall.sh
|
||||||
|
$SUDO cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh
|
||||||
|
$SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,updatePihole,updatePiholeSecondary,uninstall,setupLCD, piholeDebug}.sh
|
||||||
|
$SUDO cp /etc/.pihole/pihole /usr/local/bin/pihole
|
||||||
|
$SUDO chmod 755 /usr/local/bin/pihole
|
||||||
|
$SUDO cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash_completion.d/pihole
|
||||||
|
. /etc/bash_completion.d/pihole
|
||||||
|
|
||||||
|
#Tidy up /usr/local/bin directory if updating an old installation (can probably be removed at some point)
|
||||||
|
oldFiles=( gravity chronometer whitelist blacklist piholeLogFlush updateDashboard updatePihole updatePiholeSecondary 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
|
||||||
|
|
||||||
|
echo " done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
########################
|
||||||
|
# SCRIPT STARTS HERE! #
|
||||||
|
#######################
|
||||||
|
|
||||||
#uncomment the below if adding new dependencies (don't forget to update the install script!)
|
#uncomment the below if adding new dependencies (don't forget to update the install script!)
|
||||||
#updateDependencies
|
#updateDependencies
|
||||||
|
stopServices
|
||||||
|
installScripts
|
||||||
|
|
||||||
#TODO:
|
#TODO:
|
||||||
# - Distribute files`
|
# - Distribute files`
|
||||||
# - Run pihole -g
|
# - Run pihole -g
|
||||||
# - add root check, maybe? Do we need to? Probably a good idea.
|
# - add root check, maybe? Do we need to? Probably a good idea.
|
||||||
|
# - update install script to populate a config file with:
|
||||||
|
# -IPv4
|
||||||
|
# -IPv6
|
||||||
|
# -UpstreamDNS servers
|
||||||
|
|
Loading…
Reference in a new issue