Fix merge conflicts
This commit is contained in:
@@ -117,6 +117,7 @@ welcomeDialogs() {
|
||||
|
||||
|
||||
verifyFreeDiskSpace() {
|
||||
<<<<<<< HEAD
|
||||
# 25MB is the minimum space needed (20MB install + 5MB one day of logs.)
|
||||
requiredFreeBytes=25600
|
||||
|
||||
@@ -130,6 +131,20 @@ verifyFreeDiskSpace() {
|
||||
echo "Insufficient free space, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
=======
|
||||
# 25MB is the minimum space needed (20MB install + 5MB one day of logs.)
|
||||
requiredFreeBytes=25600
|
||||
|
||||
existingFreeBytes=`df -lk / 2>&1 | awk '{print $4}' | head -2 | tail -1`
|
||||
if ! [[ "$existingFreeBytes" =~ ^[0-9]\+$ ]]; then
|
||||
existingFreeBytes=`df -lk /dev 2>&1 | awk '{print $4}' | head -2 | tail -1`
|
||||
fi
|
||||
|
||||
if [[ $existingFreeBytes -lt $requiredFreeBytes ]]; then
|
||||
whiptail --msgbox --backtitle "Insufficient Disk Space" --title "Insufficient Disk Space" "\nYour system appears to be low on disk space. pi-hole recomends a minimum of $requiredFreeBytes Bytes.\nYou only have $existingFreeBytes Free.\n\nIf this is a new install you may need to expand your disk.\n\nTry running:\n 'sudo raspi-config'\nChoose the 'expand file system option'\n\nAfter rebooting, run this installation again.\n\ncurl -L install.pi-hole.net | bash\n" $r $c
|
||||
exit 1
|
||||
fi
|
||||
>>>>>>> development
|
||||
}
|
||||
|
||||
|
||||
@@ -599,21 +614,31 @@ runGravity() {
|
||||
/usr/local/bin/gravity.sh
|
||||
}
|
||||
|
||||
setUser(){
|
||||
# Check if user pihole exists and create if not
|
||||
echo "::: Checking if user 'pihole' exists..."
|
||||
if id -u pihole > /dev/null 2>&1; then
|
||||
echo "::: User 'pihole' already exists"
|
||||
else
|
||||
echo "::: User 'pihole' doesn't exist. Creating..."
|
||||
$SUDO useradd -r -s /usr/sbin/nologin pihole
|
||||
fi
|
||||
}
|
||||
|
||||
installPihole() {
|
||||
# Install base files and web interface
|
||||
checkForDependencies # done
|
||||
stopServices
|
||||
setUser
|
||||
$SUDO mkdir -p /etc/pihole/
|
||||
$SUDO chown www-data:www-data /var/www/html
|
||||
$SUDO chmod 775 /var/www/html
|
||||
$SUDO usermod -a -G www-data pi
|
||||
$SUDO usermod -a -G www-data pihole
|
||||
$SUDO lighty-enable-mod fastcgi fastcgi-php > /dev/null
|
||||
|
||||
getGitFiles
|
||||
installScripts
|
||||
installConfigs
|
||||
#installWebAdmin
|
||||
CreateLogFile
|
||||
installPiholeWeb
|
||||
installCron
|
||||
|
Reference in New Issue
Block a user