mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
3.2.3 (#133)
* Add info to error output * Tabs * Lines * Words * `` * Wrods * Clean up spacing for tasktype * Checkbox * 3.2.3 * Changes * THEN
This commit is contained in:
parent
abf841ae53
commit
5b125e0776
@ -34,6 +34,10 @@ The `./gravity-sync.sh restore` process completely revamped:
|
||||
- The prompts are clearer and more consistent with Gravity Sync script styling.
|
||||
- Importantly, lack of backup files in an element will not cause the restoration to fail.
|
||||
|
||||
#### 3.2.3
|
||||
|
||||
- Cleanup of the error message screen when an invalid command is run (ex: `./gravity-sync.sh wtf`)
|
||||
|
||||
## 3.1
|
||||
|
||||
### The Container Release
|
||||
|
@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS
|
||||
|
||||
# GRAVITY SYNC BY VMSTAN #####################
|
||||
PROGRAM='Gravity Sync'
|
||||
VERSION='3.2.2'
|
||||
VERSION='3.2.3'
|
||||
|
||||
# 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
|
||||
|
@ -57,3 +57,10 @@ function echo_need {
|
||||
function echo_lines {
|
||||
echo -e "========================================================"
|
||||
}
|
||||
|
||||
### Lines
|
||||
function echo_blank {
|
||||
echo -e ""
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,7 +7,14 @@
|
||||
## No Changes Made
|
||||
function exit_nochange {
|
||||
SCRIPT_END=$SECONDS
|
||||
MESSAGE="${PROGRAM} ${TASKTYPE} Aborting ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
|
||||
if [ "${TASKTYPE}" == "" ]
|
||||
then
|
||||
MESSAGE="${PROGRAM} Aborting ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
else
|
||||
MESSAGE="${PROGRAM} ${TASKTYPE} Aborting ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
fi
|
||||
|
||||
echo_info
|
||||
exit 0
|
||||
}
|
||||
@ -15,7 +22,14 @@ function exit_nochange {
|
||||
## Changes Made
|
||||
function exit_withchange {
|
||||
SCRIPT_END=$SECONDS
|
||||
MESSAGE="${PROGRAM} ${TASKTYPE} Completed ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
|
||||
if [ "${TASKTYPE}" == "" ]
|
||||
then
|
||||
MESSAGE="${PROGRAM} Completed ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
else
|
||||
MESSAGE="${PROGRAM} ${TASKTYPE} Completed ($((SCRIPT_END-SCRIPT_START)) seconds)"
|
||||
fi
|
||||
|
||||
echo_info
|
||||
exit 0
|
||||
}
|
||||
@ -24,25 +38,27 @@ function exit_withchange {
|
||||
function list_gs_arguments {
|
||||
echo -e "Usage: $0 [options]"
|
||||
echo -e "Example: '$0 pull'"
|
||||
echo -e ""
|
||||
echo_lines
|
||||
echo -e "Setup Options:"
|
||||
echo -e " ${YELLOW}config${NC} Create a new ${CONFIG_FILE} file"
|
||||
echo -e " ${YELLOW}automate${NC} Add a scheduled pull task to crontab"
|
||||
echo -e " ${YELLOW}update${NC} Update ${PROGRAM} to the latest version"
|
||||
echo -e " ${YELLOW}version${NC} Display installed version of ${PROGRAM}"
|
||||
echo -e " ${YELLOW}sudo${NC} Configure passwordless sudo for current user"
|
||||
echo -e ""
|
||||
echo -e " ${YELLOW}config${NC} Creates a new ${PROGRAM} configuration file"
|
||||
echo -e " ${YELLOW}automate${NC} Schedules the ${PROGRAM} replication task using crontab"
|
||||
echo -e " ${YELLOW}version${NC} Shows the installed version of ${PROGRAM} and check for updates"
|
||||
echo -e " ${YELLOW}update${NC} Upgrades ${PROGRAM} to the latest available version using Git"
|
||||
echo -e " ${YELLOW}dev${NC} Sets update command to use a development version of ${PROGRAM}"
|
||||
echo -e " ${YELLOW}sudo${NC} Configures passwordless sudo for current user"
|
||||
echo_blank
|
||||
echo -e "Replication Options:"
|
||||
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}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}backup${NC} Backup the ${GRAVITY_FI} on this server"
|
||||
echo -e " ${YELLOW}compare${NC} Just check for differences"
|
||||
echo -e ""
|
||||
echo -e " ${YELLOW}smart${NC} Detects Pi-hole changes on primary and secondary and then combines them"
|
||||
echo -e " ${YELLOW}pull${NC} Brings the remote Pi-hole configuration to this server"
|
||||
echo -e " ${YELLOW}push${NC} Sends the local Pi-hole configuration to the primary"
|
||||
echo -e " ${YELLOW}compare${NC} Just checks for Pi-hole differences at each side without making changes"
|
||||
echo -e " ${YELLOW}restore${NC} Restores the Pi-hole configuration on this server"
|
||||
echo -e " ${YELLOW}backup${NC} Just backs up the Pi-hole on this server"
|
||||
echo_blank
|
||||
echo -e "Debug Options:"
|
||||
echo -e " ${YELLOW}logs${NC} Show recent successful replication jobs"
|
||||
echo -e " ${YELLOW}cron${NC} Display output of last crontab execution"
|
||||
echo -e ""
|
||||
echo -e " ${YELLOW}logs${NC} Shows the recent successful replication jobs/times"
|
||||
echo -e " ${YELLOW}cron${NC} Displays the output of last crontab execution"
|
||||
echo -e " ${YELLOW}info${NC} Shows information about the current configuration"
|
||||
echo_lines
|
||||
exit_nochange
|
||||
}
|
@ -28,7 +28,7 @@ echo -e "========================================================"
|
||||
echo -e "${YELLOW}Gravity Sync by ${BLUE}@vmstan${YELLOW} - Online Installation${NC}"
|
||||
echo -e "${CYAN}https://github.com/vmstan/gravity-sync${NC}"
|
||||
echo -e "========================================================"
|
||||
# echo -e "Initalizing Short Range Sensors"
|
||||
echo -e "[${GREEN}✓${NC}] Checking Short Range Sensors"
|
||||
|
||||
# Check Root
|
||||
echo -e "[${YELLOW}i${NC}] ${YELLOW}Validating System Authorization${NC}"
|
||||
|
Loading…
Reference in New Issue
Block a user