mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
make InstallWebAdmin() a bit more intelligent, and less verbose. Checks if installing over an existing installation, and if so, will remove existing webadmin folder.
This commit is contained in:
parent
4f59577fd1
commit
96011bc2ae
1 changed files with 20 additions and 4 deletions
|
@ -252,13 +252,29 @@ $SUDO apt-get -y install git
|
|||
}
|
||||
|
||||
installWebAdmin(){
|
||||
$SUDO wget https://github.com/jacobsalmela/AdminLTE/archive/master.zip -O /var/www/master.zip
|
||||
if [ -d "/var/www/html/admin" ]; then
|
||||
$SUDO rm -rf /var/www/html/admin
|
||||
fi
|
||||
if [ -d "/var/www/html/AdminLTE-master" ]; then
|
||||
$SUDO rm -rf /var/www/html/AdminLTE-master
|
||||
fi
|
||||
$SUDO echo ":::Downloading and installing latest WebAdmin files..."
|
||||
$SUDO wget -nv https://github.com/jacobsalmela/AdminLTE/archive/master.zip -O /var/www/master.zip
|
||||
$SUDO unzip -oq /var/www/master.zip -d /var/www/html/
|
||||
$SUDO mv /var/www/html/AdminLTE-master /var/www/html/admin
|
||||
$SUDO rm /var/www/master.zip 2>/dev/null
|
||||
$SUDO touch /var/log/pihole.log
|
||||
$SUDO chmod 644 /var/log/pihole.log
|
||||
$SUDO chown dnsmasq:root /var/log/pihole.log
|
||||
$SUDO echo ":::...Done."
|
||||
|
||||
$SUDO echo ":::Creating log file and changing owner to dnsmasq..."
|
||||
if [ ! -f /var/log/pihole.log ]; then
|
||||
$SUDO touch /var/log/pihole.log
|
||||
$SUDO chmod 644 /var/log/pihole.log
|
||||
$SUDO chown dnsmasq:root /var/log/pihole.log
|
||||
$SUDO echo ":::...Done."
|
||||
else
|
||||
$SUDO echo ":::No need to create, already exists!"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
installPiholeWeb(){
|
||||
|
|
Loading…
Reference in a new issue