Merge pull request #5 from vmstan/master

Split for development
This commit is contained in:
Michael Stanclift 2020-05-23 14:04:36 -05:00 committed by GitHub
commit b60a6bb16d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -68,9 +68,9 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync
```
cd ~
wget https://github.com/vmstan/gravity-sync/archive/v1.2.4.zip
unzip v1.2.4.zip
mv ~/gravity-sync-1.2.4 ~/gravity-sync
wget https://github.com/vmstan/gravity-sync/archive/v1.2.5.zip
unzip v1.2.5.zip
mv ~/gravity-sync-1.2.5 ~/gravity-sync
cd gravity-sync
```
@ -120,7 +120,9 @@ There is an option in the script to `push` from the secondary PH back to the pri
./gravity-sync.sh push
```
Please note that the "push" option *does not make any backups of anything*. There is a warning about potental data loss before executing this function. This function purposefuly asks for user interaction to avoid being accidentally automated.
Before executing, this will make a copy of the remote database under `backup/gravity.db.push` then push the local configuration to the remote server.
This function purposefuly asks for user interaction to avoid being accidentally automated.
## Updates

View File

@ -103,7 +103,7 @@ function push_gs {
rsync -v -e 'ssh -p 22' ${REMOTE_USER}@${REMOTE_HOST}:${PIHOLE_DIR}/${GRAVITY_FI} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.push
echo -e "[${CYAN}STAT${NC}] Pushing ${GRAVITY_FI} to ${REMOTE_HOST}"
rsync --rsync-path="sudo rsync" -v -e 'ssh -p 22' ${PIHOLE_DIR}/${GRAVITY_FI} ${REMOTE_USER}@${REMOTE_HOST}:${PIHOLE_DIR}/${GRAVITY_FI}
echo -e "[${CYAN}STAT${NC}] Applying Rermissions to Remote ${GRAVITY_FI}"
echo -e "[${CYAN}STAT${NC}] Applying Permissions to Remote ${GRAVITY_FI}"
ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI}"
ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chown pihole:pihole ${PIHOLE_DIR}/${GRAVITY_FI}"
echo -e "[${CYAN}STAT${NC}] Reloading FTLDNS Configuration"