Merge pull request #37 from vmstan:development

1.8.1
This commit is contained in:
Michael Stanclift 2020-06-03 15:53:37 -05:00 committed by GitHub
commit 60c911d41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 4 deletions

View File

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

View File

@ -2,6 +2,7 @@
## 1.8
### The Logical Release
**Features**
There is nothing really sexy here, but a lot of changes under the covers to improve reliablity between different SSH client types. A lot of the logic and functions are more consistent and cleaner. In some cultures, fewer bugs and more reliablity are considered features. Much of this will continue through the 1.8.x line.
@ -11,6 +12,9 @@ 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.
- 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.
## 1.7
### The Andrew Release

View File

@ -1 +1 @@
1.8.0
1.8.1

View File

@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS
# GRAVITY SYNC BY VMSTAN #####################
PROGRAM='Gravity Sync'
VERSION='1.8.0'
VERSION='1.8.1'
# 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
@ -1345,6 +1345,21 @@ function echo_need {
echo -en "${NEED} ${MESSAGE}: "
}
# Root Check
function root_check {
if [ ! "$EUID" -ne 0 ]
then
TASKTYPE='ROOT'
MESSAGE="${MESSAGE} ${TASKTYPE}"
echo_fail
MESSAGE="${PROGRAM} Must Not Run as Root"
echo_warn
exit_nochange
fi
}
# SCRIPT EXECUTION ###########################
MESSAGE="${PROGRAM} ${VERSION} Executing"
@ -1353,6 +1368,8 @@ function echo_need {
MESSAGE="Evaluating Arguments"
echo_stat
root_check
case $# in
0)