From 04a9791be2e39e1923d05850276902fb5c6ce2c4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 23 Dec 2016 23:41:40 +0100 Subject: [PATCH 1/4] Save empty password --- advanced/Scripts/webpage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 38e82c14..b6d500cd 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -61,6 +61,7 @@ SetWebPassword(){ echo "WEBPASSWORD=${hash}" >> /etc/pihole/setupVars.conf echo "New password set" else + echo "WEBPASSWORD=" >> /etc/pihole/setupVars.conf echo "Password removed" fi From a0e0465036eb4fab12851165d97ce709c0e73880 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 25 Dec 2016 17:32:59 +0100 Subject: [PATCH 2/4] Revert "Merge pull request #1018 from pi-hole/diginc-patch-1" This reverts commit ff3c36a7a246d46e3cff5b1b3a89f0288352ce78, reversing changes made to 9355a8ad0e335efd7667d202e07b4d31781c388e. --- advanced/pihole.cron | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/advanced/pihole.cron b/advanced/pihole.cron index cb9965f0..8311acfb 100644 --- a/advanced/pihole.cron +++ b/advanced/pihole.cron @@ -13,15 +13,14 @@ # scripts, any changes made to this file will be overwritten when the softare # is updated or re-installed. Please make any changes to the appropriate crontab # or other cron file snippets. -PATH="$PATH:/usr/local/bin/" # Pi-hole: Update the ad sources once a week on Sunday at 01:59 # Download any updates from the adlists -59 1 * * 7 root pihole updateGravity +59 1 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updateGravity # Pi-hole: Update Pi-hole! Uncomment to enable auto update -#30 2 * * 7 root pihole updatePihole +#30 2 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updatePihole # Pi-hole: Flush the log daily at 00:00 so it doesn't get out of control # Stats will be viewable in the Web interface thanks to the cron job above -00 00 * * * root pihole flush +00 00 * * * root PATH="$PATH:/usr/local/bin/" pihole flush From ca056d32d2c29f90252635b74ece15f14b098bcf Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 25 Dec 2016 21:22:59 +0100 Subject: [PATCH 3/4] Remove git -C --- advanced/Scripts/update.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) mode change 100644 => 100755 advanced/Scripts/update.sh diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh old mode 100644 new mode 100755 index 10728cd8..5459ec04 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -22,9 +22,15 @@ readonly PI_HOLE_FILES_DIR="/etc/.pihole" is_repo() { # Use git to check if directory is currently under VCS, return the value local directory="${1}" - - git -C "${directory}" status --short &> /dev/null - return + local curdir + local rc + + curdir="${PWD}" + cd "${directory}" &> /dev/null || return 1 + git status --short &> /dev/null + rc=$? + cd "${curdir}" &> /dev/null || return 1 + return $rc } prep_repo() { @@ -46,16 +52,20 @@ make_repo() { update_repo() { local directory="${1}" - local retVal=0 + local curdir # Pull the latest commits + curdir="${PWD}" + cd "${directory}" &> /dev/null || return 1 # Stash all files not tracked for later retrieval - git -C "${directory}" stash --all --quiet &> /dev/null || ${retVal}=1 + git stash --all --quiet &> /dev/null # Force a clean working directory for cloning - git -C "${directory}" clean --force -d &> /dev/null || ${retVal}=1 + git clean --force -d &> /dev/null # Fetch latest changes and apply - git -C "${directory}" pull --quiet &> /dev/null || ${retVal}=1 - return ${retVal} + git pull --quiet &> /dev/null + cd "{$curdir}" &> /dev/null || return 1 + + return } getGitFiles() { From e50947eb58be3e41079085bbe7caff99c00d9347 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 25 Dec 2016 21:26:06 +0100 Subject: [PATCH 4/4] mend --- advanced/Scripts/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 5459ec04..eb6ccd29 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -63,7 +63,7 @@ update_repo() { git clean --force -d &> /dev/null # Fetch latest changes and apply git pull --quiet &> /dev/null - cd "{$curdir}" &> /dev/null || return 1 + cd "${curdir}" &> /dev/null || return 1 return }