Correct output of argument listing

This commit is contained in:
Michael Stanclift 2020-07-08 09:48:24 -05:00
parent 6626ec93a0
commit c8955d0ecf
4 changed files with 88 additions and 86 deletions

View File

@ -14,8 +14,8 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync
```bash ```bash
cd ~ cd ~
wget https://github.com/vmstan/gravity-sync/archive/v2.0.1.zip wget https://github.com/vmstan/gravity-sync/archive/v2.0.2.zip
unzip v2.0.1.zip -d gravity-sync unzip v2.0.2.zip -d gravity-sync
cd gravity-sync cd gravity-sync
``` ```

View File

@ -16,6 +16,9 @@ New installs will use the `smart` function by default. Existing users who want t
#### 2.0.1 #### 2.0.1
- Fixes bug that caused existing crontab entry not to be removed when switching from `pull` to Smart Sync. - Fixes bug that caused existing crontab entry not to be removed when switching from `pull` to Smart Sync.
#### 2.0.2
- Correct output of `smart` function when script is run without proper function requested.
## 1.8 ## 1.8
### The Logical Release ### The Logical Release
@ -27,18 +30,18 @@ There is nothing really sexy here, but a lot of changes under the covers to impr
- Adds custom port specification to ssh-copy-id and dropbearkey commands during configuration generation. - Adds custom port specification to ssh-copy-id and dropbearkey commands during configuration generation.
- Generally better error handling of configuration options. - Generally better error handling of configuration options.
#### 1.8.1
- Detects if script is running as the root user or via `sudo ./gravity-sync.sh` and exits on error. [#34](https://github.com/vmstan/gravity-sync/issues/34)
#### 1.8.2
- Corrects issue where `custom.list` file would not replicate if the file didn't exist locally, and there were no other changes to replicate. [#39](https://github.com/vmstan/gravity-sync/issues/39)
#### 1.8.3 #### 1.8.3
- Simplified method for input of automation frequency when running `./gravity-sync.sh automate` function. - Simplified method for input of automation frequency when running `./gravity-sync.sh automate` function.
- Now removes existing automation task from crontab, if it exists, when re-running `automate` function. - Now removes existing automation task from crontab, if it exists, when re-running `automate` function.
- Automation can be disabled by setting frequency to `0` when prompted. - Automation can be disabled by setting frequency to `0` when prompted.
- Adds `dev` tag to `./gravity-sync.sh version` output for users running off the development branch. - Adds `dev` tag to `./gravity-sync.sh version` output for users running off the development branch.
#### 1.8.2
- Corrects issue where `custom.list` file would not replicate if the file didn't exist locally, and there were no other changes to replicate. [#39](https://github.com/vmstan/gravity-sync/issues/39)
#### 1.8.1
- Detects if script is running as the root user or via `sudo ./gravity-sync.sh` and exits on error. [#34](https://github.com/vmstan/gravity-sync/issues/34)
## 1.7 ## 1.7
### The Andrew Release ### The Andrew Release
@ -50,35 +53,24 @@ There is nothing really sexy here, but a lot of changes under the covers to impr
**Known Issues** **Known Issues**
- No new Star Trek references. - No new Star Trek references.
#### 1.7.7 #### 1.7.1
- `config` function will attempt to ping remote host to validate network connection, can by bypassed by adding `PING_AVOID='1'` to your `gravity-sync.conf` file. - There is a changelog file now. I'm mentioning it in the changelog file. So meta.
- Changes some [INFO] messages to [WARN] where approprate. - `./gravity-sync.sh version` will check for and alert you for new versions.
- Adds aliases for more Gravity Sync functions.
- Shows current version on each script execution.
- Adds time output to Aborting message (exit without change.)
- Includes parsing of functions in time calculation.
- Checks for existance of Pi-hole binaries during validation.
- Less chatty about each step of configuration validation if it completes.
- Less chatty about replication validation if it's not necessary.
- Less chatty about file validation if no changes are required.
- When applying `update` in DEV mode, the Git branch used will be shown.
- Validates log export operation.
#### 1.7.6 #### 1.7.2
- Detects `dbclient` install as alternative to OpenSSH Client. 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.
- Attempts to install OpenSSH Client if not found, and Dropbear is not alternative. ```
- Fix bug with `dropbearkey` not finding .ssh folder. cd gravity-sync
- Numerous fixes to accomidate DietPi in general. touch dev
- Fixes issue where `compare` function would show changes where actually none existed. ./gravity-sync.sh update
- [WARN] header is now purple all the way across, consistent with [INFO] as of 1.7.4. ```
- Fixes issue where `custom.list` would only pull if the file already existed on the secondary Pi-hole. Delete the `dev` file and update again to revert back to the stable/master branch.
- One new Star Trek reference.
#### 1.7.5 #### 1.7.3
- No code changes! - Cleaning up output of argument listing
- Primary README now only reflect "The Easy Way" to install and configure Gravity Sync
- "The Less Easy Way" are now part of [ADVANCED.md](https://github.com/vmstan/gravity-sync/blob/master/ADVANCED.md) **Deprecation**
- All advanced configuration options are outlined in [ADVANCED.md](https://github.com/vmstan/gravity-sync/blob/master/ADVANCED.md) - Removes `beta` function for applying development branch updates.
#### 1.7.4 #### 1.7.4
- `./gravity-sync.sh dev` will now toggle dev flag on/off. No `touch` required, although it still works that way under the covers. Improvement of methods added in 1.7.2. - `./gravity-sync.sh dev` will now toggle dev flag on/off. No `touch` required, although it still works that way under the covers. Improvement of methods added in 1.7.2.
@ -93,24 +85,35 @@ There is nothing really sexy here, but a lot of changes under the covers to impr
- Detects absence of `ssh-keygen` utility on host OS and will use `dropbearkey` as an alternative (DietPi) - Detects absence of `ssh-keygen` utility on host OS and will use `dropbearkey` as an alternative (DietPi)
- Changelog polarity reversed after heated discussions with marketing team. - Changelog polarity reversed after heated discussions with marketing team.
#### 1.7.3 #### 1.7.5
- Cleaning up output of argument listing - No code changes!
- Primary README now only reflect "The Easy Way" to install and configure Gravity Sync
- "The Less Easy Way" are now part of [ADVANCED.md](https://github.com/vmstan/gravity-sync/blob/master/ADVANCED.md)
- All advanced configuration options are outlined in [ADVANCED.md](https://github.com/vmstan/gravity-sync/blob/master/ADVANCED.md)
#### 1.7.2 #### 1.7.6
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. - Detects `dbclient` install as alternative to OpenSSH Client.
``` - Attempts to install OpenSSH Client if not found, and Dropbear is not alternative.
cd gravity-sync - Fix bug with `dropbearkey` not finding .ssh folder.
touch dev - Numerous fixes to accomidate DietPi in general.
./gravity-sync.sh update - Fixes issue where `compare` function would show changes where actually none existed.
``` - [WARN] header is now purple all the way across, consistent with [INFO] as of 1.7.4.
Delete the `dev` file and update again to revert back to the stable/master branch. - Fixes issue where `custom.list` would only pull if the file already existed on the secondary Pi-hole.
- One new Star Trek reference.
**Deprecation** #### 1.7.7
- Removes `beta` function for applying development branch updates. - `config` function will attempt to ping remote host to validate network connection, can by bypassed by adding `PING_AVOID='1'` to your `gravity-sync.conf` file.
- Changes some [INFO] messages to [WARN] where approprate.
#### 1.7.1 - Adds aliases for more Gravity Sync functions.
- There is a changelog file now. I'm mentioning it in the changelog file. So meta. - Shows current version on each script execution.
- `./gravity-sync.sh version` will check for and alert you for new versions. - Adds time output to Aborting message (exit without change.)
- Includes parsing of functions in time calculation.
- Checks for existance of Pi-hole binaries during validation.
- Less chatty about each step of configuration validation if it completes.
- Less chatty about replication validation if it's not necessary.
- Less chatty about file validation if no changes are required.
- When applying `update` in DEV mode, the Git branch used will be shown.
- Validates log export operation.
## 1.6 ## 1.6
### The Restorative Release ### The Restorative Release
@ -146,14 +149,14 @@ Delete the `dev` file and update again to revert back to the stable/master branc
- All new and exciting code comments. - All new and exciting code comments.
- No new Star Trek references. - No new Star Trek references.
#### 1.4.3 #### 1.4.1
- Bug fixes around not properly utilizing custom SSH keyfile. - Adds variables for custom log locations to `gravity-sync.conf`, see `.example` file for listing.
#### 1.4.2 #### 1.4.2
- Will prompt to create new `gravity-sync.conf` file when run without an existing configuration. - Will prompt to create new `gravity-sync.conf` file when run without an existing configuration.
#### 1.4.1 #### 1.4.3
- Adds variables for custom log locations to `gravity-sync.conf`, see `.example` file for listing. - Bug fixes around not properly utilizing custom SSH keyfile.
## 1.3 ## 1.3
### The Comparison Release ### The Comparison Release
@ -165,22 +168,21 @@ Delete the `dev` file and update again to revert back to the stable/master branc
- Additional debugging options such as checking last cronjob output via `./gravity-sync.sh cron` if configured. - Additional debugging options such as checking last cronjob output via `./gravity-sync.sh cron` if configured.
- Much more consistency in how running commands are processed in interactive mode. - Much more consistency in how running commands are processed in interactive mode.
#### 1.3.4
- Moves backup of local database before initiating remote pull.
- Validates file ownership and permissions before attempting to rewrite.
- Added two Star Trek references.
#### 1.3.3
- Corrected Pihole bin path issue that cause automated sync not to reload services.
#### 1.3.2
- MUCH cleaner output, same great features.
#### 1.3.1 #### 1.3.1
- Changes [GOOD] to [DONE] in execution output. - Changes [GOOD] to [DONE] in execution output.
- Better validation of initial SSH connection. - Better validation of initial SSH connection.
- Support for password based authentication using SSHPASS. - Support for password based authentication using SSHPASS.
#### 1.3.2
- MUCH cleaner output, same great features.
#### 1.3.3
- Corrected Pihole bin path issue that cause automated sync not to reload services.
#### 1.3.4
- Moves backup of local database before initiating remote pull.
- Validates file ownership and permissions before attempting to rewrite.
- Added two Star Trek references.
## 1.2 ## 1.2
### The Functional Release ### The Functional Release
@ -188,23 +190,23 @@ Delete the `dev` file and update again to revert back to the stable/master branc
- Does not look for permission to update when run. - Does not look for permission to update when run.
- Cleanup and expand comments. - Cleanup and expand comments.
#### 1.2.5 #### 1.2.1
- Push function now does a backup, on the secondary PH, of the primary database, before pushing. - Improved logging functions.
#### 1.2.4 #### 1.2.2
- Changes `~` to `$HOME`. - Different style for status updates.
- Fixes bug that prevented sync from working when run via crontab.
#### 1.2.3 #### 1.2.3
- Uses a dedicated backup folder for `.backup` and `.last` files. - Uses a dedicated backup folder for `.backup` and `.last` files.
- Copies db instead of moving to rename and then replacing to be more reliable. - Copies db instead of moving to rename and then replacing to be more reliable.
- Even cleaner label status. - Even cleaner label status.
#### 1.2.2 #### 1.2.4
- Different style for status updates. - Changes `~` to `$HOME`.
- Fixes bug that prevented sync from working when run via crontab.
#### 1.2.1 #### 1.2.5
- Improved logging functions. - Push function now does a backup, on the secondary PH, of the primary database, before pushing.
## 1.1 ## 1.1
### The Pushy Release ### The Pushy Release
@ -212,22 +214,22 @@ Delete the `dev` file and update again to revert back to the stable/master branc
- Seperated main purpose of script into `pull` argument. - Seperated main purpose of script into `pull` argument.
- Allow process to reverse back using `push` argument. - Allow process to reverse back using `push` argument.
#### 1.1.6 #### 1.1.2
- Code easier to read with proper tabs. - First release since move from being just a Gist.
- Just relearning how to use GitHub, minor bug fixes.
#### 1.1.5 #### 1.1.3
- Added ability to view logs with `./gravity-sync.sh logs`. - Now includes example an configuration file.
#### 1.1.4 #### 1.1.4
- Added update script. - Added update script.
- Added version check. - Added version check.
#### 1.1.3 #### 1.1.5
- Now includes example an configuration file. - Added ability to view logs with `./gravity-sync.sh logs`.
#### 1.1.2 #### 1.1.6
- First release since move from being just a Gist. - Code easier to read with proper tabs.
- Just relearning how to use GitHub, minor bug fixes.
## 1.0 ## 1.0
### The Initial Release ### The Initial Release

View File

@ -1 +1 @@
2.0.1 2.0.2

View File

@ -1360,7 +1360,7 @@ function list_gs_arguments {
echo -e " ${YELLOW}version${NC} Display installed version of ${PROGRAM}" echo -e " ${YELLOW}version${NC} Display installed version of ${PROGRAM}"
echo -e "" echo -e ""
echo -e "Replication Options:" echo -e "Replication Options:"
echo -e " ${YELLOW}sync${NC} Detect changes on each side and bring them together" echo -e " ${YELLOW}smart${NC} Detect changes on each side and bring them together"
echo -e " ${YELLOW}pull${NC} Force remote configuration changes to this server" echo -e " ${YELLOW}pull${NC} Force remote configuration changes to this server"
echo -e " ${YELLOW}push${NC} Force local configuration made on this server back" echo -e " ${YELLOW}push${NC} Force local configuration made on this server back"
echo -e " ${YELLOW}restore${NC} Restore the ${GRAVITY_FI} on this server" echo -e " ${YELLOW}restore${NC} Restore the ${GRAVITY_FI} on this server"