mirror of
https://github.com/vmstan/gravity-sync.git
synced 2025-07-09 02:34:06 -04:00
commit
bde9b3b673
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ backup/*.last
|
|||||||
backup/*.backup
|
backup/*.backup
|
||||||
backup/*.push
|
backup/*.push
|
||||||
backup/*.pull
|
backup/*.pull
|
||||||
|
dev
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -4,24 +4,33 @@
|
|||||||
### The Andrew Release
|
### The Andrew Release
|
||||||
|
|
||||||
**Features**
|
**Features**
|
||||||
|
|
||||||
- Gravity Sync will now manage the `custom.list` file that contains the "Local DNS Records" function within the Pi-hole interface.
|
- Gravity Sync will now manage the `custom.list` file that contains the "Local DNS Records" function within the Pi-hole interface.
|
||||||
- If you do not want this feature enabled it can be bypassed by adding a `SKIP_CUSTOM='1'` to your .conf file.
|
- If you do not want this feature enabled it can be bypassed by adding a `SKIP_CUSTOM='1'` to your .conf file.
|
||||||
- Sync will be trigged during a pull operation if there are changes to either file.
|
- Sync will be trigged during a pull operation if there are changes to either file.
|
||||||
|
|
||||||
**Known Issues**
|
**Known Issues**
|
||||||
|
|
||||||
- No new Star Trek references.
|
- No new Star Trek references.
|
||||||
|
|
||||||
#### 1.7.1
|
#### 1.7.1
|
||||||
- There is a changelog file now. I'm mentioning it in the changelog file. So meta.
|
- There is a changelog file now. I'm mentioning it in the changelog file. So meta.
|
||||||
- `./gravity-sync.sh version` will check for and alert you for new versions.
|
- `./gravity-sync.sh version` will check for and alert you for new versions.
|
||||||
|
|
||||||
|
#### 1.7.2
|
||||||
|
This update changes the way that beta/development updates are applied. To continue receving the development branch, create an empty file in the `gravity-sync` folder called `dev` and afterwards the standard `./gravity-sync.sh update` function will apply the correct updates.
|
||||||
|
```
|
||||||
|
cd gravity-sync
|
||||||
|
touch dev
|
||||||
|
./gravity-sync.sh update
|
||||||
|
```
|
||||||
|
Delete the `dev` file and update again to revert back to the stable/master branch.
|
||||||
|
|
||||||
|
**Deprecation**
|
||||||
|
- Removes `beta` function for applying development branch updates.
|
||||||
|
|
||||||
## 1.6
|
## 1.6
|
||||||
### The Restorative Release
|
### The Restorative Release
|
||||||
|
|
||||||
**Features**
|
**Features**
|
||||||
|
|
||||||
- New `./gravity-sync.sh restore` function will bring a previous version of the `gravity.db` back from the dead.
|
- New `./gravity-sync.sh restore` function will bring a previous version of the `gravity.db` back from the dead.
|
||||||
- Changes way that GS prompts for data input and how confirmation prompts are handled.
|
- Changes way that GS prompts for data input and how confirmation prompts are handled.
|
||||||
- Adds ability to override verification of push, restore or config reset, see `.example` file for details.
|
- Adds ability to override verification of push, restore or config reset, see `.example` file for details.
|
||||||
@ -34,7 +43,6 @@
|
|||||||
### The Automated Release
|
### The Automated Release
|
||||||
|
|
||||||
**Features**
|
**Features**
|
||||||
|
|
||||||
- You can now easily deploy the task automation via crontab by running `./gravity-sync.sh automate` which will simply ask how often you'd like to run the script per hour, and then create the entry for you.
|
- You can now easily deploy the task automation via crontab by running `./gravity-sync.sh automate` which will simply ask how often you'd like to run the script per hour, and then create the entry for you.
|
||||||
- If you've already configured an entry for this manually with a prior version, the script should detect this and ask that you manually remove it or edit it via crontab -e. I'm hesitant to delete existing entries here, as it could potentially remove something unrelated to Gravity Sync.
|
- If you've already configured an entry for this manually with a prior version, the script should detect this and ask that you manually remove it or edit it via crontab -e. I'm hesitant to delete existing entries here, as it could potentially remove something unrelated to Gravity Sync.
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
wget https://github.com/vmstan/gravity-sync/archive/v1.7.1.zip
|
wget https://github.com/vmstan/gravity-sync/archive/v1.7.2.zip
|
||||||
unzip v1.7.1.zip
|
unzip v1.7.2.zip
|
||||||
mv ~/gravity-sync-1.7.1 ~/gravity-sync
|
mv ~/gravity-sync-1.7.2 ~/gravity-sync
|
||||||
cd gravity-sync
|
cd gravity-sync
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# GRAVITY SYNC BY VMSTAN #####################
|
# GRAVITY SYNC BY VMSTAN #####################
|
||||||
PROGRAM='Gravity Sync'
|
PROGRAM='Gravity Sync'
|
||||||
VERSION='1.7.1'
|
VERSION='1.7.2'
|
||||||
|
|
||||||
# Execute from the home folder of the user who owns it (ex: 'cd ~/gravity-sync')
|
# Execute from the home folder of the user who owns it (ex: 'cd ~/gravity-sync')
|
||||||
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
||||||
@ -99,25 +99,33 @@ function update_gs {
|
|||||||
TASKTYPE='UPDATE'
|
TASKTYPE='UPDATE'
|
||||||
# logs_export # dumps log prior to execution because script stops after successful pull
|
# logs_export # dumps log prior to execution because script stops after successful pull
|
||||||
|
|
||||||
|
if [ -f "dev" ]
|
||||||
|
then
|
||||||
|
BRANCH='development'
|
||||||
|
else
|
||||||
|
BRANCH='master'
|
||||||
|
fi
|
||||||
|
|
||||||
MESSAGE="Requires GitHub Installation"
|
MESSAGE="Requires GitHub Installation"
|
||||||
echo_info
|
echo_info
|
||||||
git reset --hard
|
git fetch --all
|
||||||
git pull
|
git reset --hard origin/${BRANCH}
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
## Developer Branch
|
## Developer Branch
|
||||||
function beta_gs {
|
# function beta_gs {
|
||||||
TASKTYPE='BETA'
|
# TASKTYPE='BETA'
|
||||||
# logs_export # dumps log prior to execution because script stops after successful pull
|
# # logs_export # dumps log prior to execution because script stops after successful pull
|
||||||
|
#
|
||||||
MESSAGE="Requires GitHub Installation"
|
# MESSAGE="Requires GitHub Installation"
|
||||||
echo_info
|
# echo_info
|
||||||
git reset --hard
|
# git fetch --all
|
||||||
git fetch origin
|
# git reset --hard origin/development
|
||||||
git pull origin development
|
# # git fetch origin
|
||||||
exit
|
# # git pull origin development
|
||||||
}
|
# exit
|
||||||
|
# }
|
||||||
|
|
||||||
# Gravity Core Functions
|
# Gravity Core Functions
|
||||||
## Pull Function
|
## Pull Function
|
||||||
@ -864,6 +872,8 @@ function list_gs_arguments {
|
|||||||
echo -e "Setup Options:"
|
echo -e "Setup Options:"
|
||||||
echo -e " ${YELLOW}config${NC} Create a new ${CONFIG_FILE} file"
|
echo -e " ${YELLOW}config${NC} Create a new ${CONFIG_FILE} file"
|
||||||
echo -e " ${YELLOW}automate${NC} Add scheduled task to run sync"
|
echo -e " ${YELLOW}automate${NC} Add scheduled task to run sync"
|
||||||
|
echo -e " ${YELLOW}update${NC} Use GitHub to update this script to the latest version"
|
||||||
|
echo -e " ${YELLOW}version${NC} Display your version of ${PROGRAM}"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "Replication Options:"
|
echo -e "Replication Options:"
|
||||||
echo -e " ${YELLOW}pull${NC} Sync the ${GRAVITY_FI} database on primary Pi-hole to this server"
|
echo -e " ${YELLOW}pull${NC} Sync the ${GRAVITY_FI} database on primary Pi-hole to this server"
|
||||||
@ -871,12 +881,11 @@ function list_gs_arguments {
|
|||||||
echo -e " ${YELLOW}restore${NC} Restore ${GRAVITY_FI} on this server from previous copy"
|
echo -e " ${YELLOW}restore${NC} Restore ${GRAVITY_FI} on this server from previous copy"
|
||||||
echo -e " ${YELLOW}compare${NC} Just check for differences between primary and secondary"
|
echo -e " ${YELLOW}compare${NC} Just check for differences between primary and secondary"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "Update Options:"
|
# echo -e "Update Options:"
|
||||||
echo -e " ${YELLOW}update${NC} Use GitHub to update this script to the latest version"
|
# echo -e " ${YELLOW}update${NC} Use GitHub to update this script to the latest version"
|
||||||
echo -e " ${YELLOW}beta${NC} Use GitHub to update this script to the latest beta version"
|
# echo -e " ${YELLOW}beta${NC} Use GitHub to update this script to the latest beta version"
|
||||||
echo -e ""
|
# echo -e ""
|
||||||
echo -e "Debug Options:"
|
echo -e "Debug Options:"
|
||||||
echo -e " ${YELLOW}version${NC} Display your version of ${PROGRAM}"
|
|
||||||
echo -e " ${YELLOW}logs${NC} Show recent successful replication jobs"
|
echo -e " ${YELLOW}logs${NC} Show recent successful replication jobs"
|
||||||
echo -e " ${YELLOW}cron${NC} Display output of last crontab execution"
|
echo -e " ${YELLOW}cron${NC} Display output of last crontab execution"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
@ -1104,16 +1113,16 @@ case $# in
|
|||||||
exit_nochange
|
exit_nochange
|
||||||
;;
|
;;
|
||||||
|
|
||||||
beta)
|
# beta)
|
||||||
TASKTYPE='BETA'
|
# TASKTYPE='BETA'
|
||||||
echo_good
|
# echo_good
|
||||||
|
|
||||||
MESSAGE="${TASKTYPE} Requested"
|
# MESSAGE="${TASKTYPE} Requested"
|
||||||
echo_info
|
# echo_info
|
||||||
|
|
||||||
beta_gs
|
# beta_gs
|
||||||
exit_nochange
|
# exit_nochange
|
||||||
;;
|
# ;;
|
||||||
|
|
||||||
logs)
|
logs)
|
||||||
TASKTYPE='LOGS'
|
TASKTYPE='LOGS'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user