Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Catch up 3.3 (#142)
Browse files Browse the repository at this point in the history
* 3.2.5 (#140)

Co-authored-by: Michael Stanclift <[email protected]>

* Adds backup cleanup back to process

* Add backup cleanup to compare script when no changes are detected.

* Trek reference

* Redundant

* 3.2.6

* 3.2.6

Co-authored-by: Michael Stanclift <[email protected]>
Co-authored-by: Michael Stanclift <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2021
1 parent d0d2ae9 commit ecbb430
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ The `./gravity-sync.sh restore` process completely revamped:

- Changes script startup and shutdown text format.

#### 3.2.5

- Correct error where Docker based installs would fail to restart if Docker exec commands required sudo privileges.
- Correct error where setup script would prompt twice for Local/Remote DNSMASQ directories when using Docker.

#### 3.2.6

- Adds old backup removal tasks into push/pull/sync/compare functions.

## 3.1

### The Container Release
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.4
3.2.6
2 changes: 1 addition & 1 deletion gravity-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS

# GRAVITY SYNC BY VMSTAN #####################
PROGRAM='Gravity Sync'
VERSION='3.2.4'
VERSION='3.2.6'

# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
# Requires Pi-Hole 5.x or higher already be installed, for help visit https://pi-hole.net
Expand Down
2 changes: 1 addition & 1 deletion includes/gs-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function backup_remote_cname {
}

function backup_cleanup {
MESSAGE="Cleaning Up Old Backups"
MESSAGE="Scrubbing ${BACKUP_RETAIN} Redundant Antimatter Containment Pods"
echo_stat

find ${LOCAL_FOLDR}/${BACKUP_FOLD}/$(date +%Y)*.backup -mtime +${BACKUP_RETAIN} -type f -delete
Expand Down
2 changes: 2 additions & 0 deletions includes/gs-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ function task_compare {

previous_md5
md5_compare
backup_cleanup

exit_withchange
}
4 changes: 2 additions & 2 deletions includes/gs-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function advanced_config_generate {
echo_stat
sed -i "/# DNSMAQ_DIR=''/c\DNSMAQ_DIR='${INPUT_DNSMAQ_DIR}'" ${LOCAL_FOLDR}/${CONFIG_FILE}
error_validate
SKIP_DNSMAQ_DIR="1"
SKIP_DNSMASQ_DIR="1"
else
MESSAGE="This setting is required!"
echo_warn
Expand Down Expand Up @@ -226,7 +226,7 @@ function advanced_config_generate {
echo_stat
sed -i "/# RNSMAQ_DIR=''/c\RNSMAQ_DIR='${INPUT_RNSMAQ_DIR}'" ${LOCAL_FOLDR}/${CONFIG_FILE}
error_validate
SKIP_RNSMAQ_DIR="1"
SKIP_RNSMASQ_DIR="1"
else
MESSAGE="This setting is required!"
echo_warn
Expand Down
4 changes: 2 additions & 2 deletions includes/gs-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ function ph_type {
PH_EXEC="${PIHOLE_BIN}"
elif [ "$PH_IN_TYPE" == "docker" ]
then
PH_EXEC="${DOCKER_BIN} exec ${DOCKER_CON} pihole"
PH_EXEC="sudo ${DOCKER_BIN} exec ${DOCKER_CON} pihole"
fi

if [ "$RH_IN_TYPE" == "default" ]
then
RH_EXEC="${RIHOLE_BIN}"
elif [ "$RH_IN_TYPE" == "docker" ]
then
RH_EXEC="${ROCKER_BIN} exec ${ROCKER_CON} pihole"
RH_EXEC="sudo ${ROCKER_BIN} exec ${ROCKER_CON} pihole"
fi
}

Expand Down
1 change: 1 addition & 0 deletions includes/gs-hashing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ function md5_compare {
else
MESSAGE="No Replication Required"
echo_info
backup_cleanup
exit_nochange
fi
}
Expand Down
1 change: 1 addition & 0 deletions includes/gs-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ function pull_gs {
pull_gs_cname
pull_gs_reload
md5_recheck
backup_cleanup

logs_export
exit_withchange
Expand Down
3 changes: 2 additions & 1 deletion includes/gs-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ function push_gs {
push_gs_cust
push_gs_cname
push_gs_reload

md5_recheck
backup_cleanup

logs_export
exit_withchange
}
1 change: 1 addition & 0 deletions includes/gs-smart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ function smart_gs {
fi

md5_recheck
backup_cleanup

logs_export
exit_withchange
Expand Down

0 comments on commit ecbb430

Please sign in to comment.