mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
* start 3.6 * Remove backup retention reference * dbclient_warning removed * remove extra linebreaks * remove backup task * Increased backup and integrity timeouts to 240 * Remove brackets from message codes * Arrow for info * Different arrow * Ain't gonna restore no more * Abortion aborted * format change for config test * All kinds of yes and no * echo_grav * Move advanced to the end * removed custom ssh, ping check and port options from wizard * primary address changes * rework user input * good clean fun * smaller version text * less info * Set push commands to default 240 second timeout * Remove reference to backup and restore tasks from log output * Remove backup refs * Move UI elements over to gs-ui * Move ICMP to UI * More UI * More UI * UI changes * Add end config * Spaces and such * MOre UI * UI * UI UI UI * UI UI * echo_blue * echo_blue too * switch * fip flop * Too blue * Fix path being run * = * Remove () * continued cleaning * Almost done rewriting config * switch CNAME defaults * Add CNAME function
62 lines
1.8 KiB
Bash
62 lines
1.8 KiB
Bash
# GRAVITY SYNC BY VMSTAN #####################
|
|
# gs-purge.sh ################################
|
|
|
|
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
|
# This code is called from the main gravity-sync.sh file and should not execute directly!
|
|
|
|
## Purge Task
|
|
function task_purge {
|
|
TASKTYPE="THE-PURGE"
|
|
MESSAGE="${MESSAGE}: ${TASKTYPE}"
|
|
echo_good
|
|
|
|
echo_lines
|
|
echo -e "THIS WILL RESET YOUR ENTIRE GRAVITY SYNC INSTALLATION"
|
|
echo -e "This will remove:"
|
|
echo -e "- Your ${CONFIG_FILE} file."
|
|
|
|
if [ -f "${LOCAL_FOLDR}/dev" ]
|
|
then
|
|
echo -e "- Your development branch updater."
|
|
elif [ -f "${LOCAL_FOLDR}/beta" ]
|
|
then
|
|
echo -e "- Your beta branch updater."
|
|
fi
|
|
|
|
echo -e "- All cronjob/automation tasks."
|
|
echo -e "- All job history/logs."
|
|
echo -e "- Associated SSH id_rsa keys."
|
|
echo -e ""
|
|
echo -e "This function cannot be undone!"
|
|
echo -e ""
|
|
echo -e "YOU WILL NEED TO REBUILD GRAVITY SYNC AFTER EXECUTION"
|
|
echo -e "Pi-hole binaries, configuration and services ARE NOT impacted!"
|
|
echo -e "Your device will continue to resolve and block DNS requests,"
|
|
echo -e "but your ${UI_GRAVITY_NAME} and ${UI_CUSTOM_NAME} WILL NOT sync anymore,"
|
|
echo -e "until you reconfigure Gravity Sync on this device."
|
|
echo_lines
|
|
|
|
intent_validate
|
|
|
|
MESSAGE="${UI_PURGE_CLEANING_DIR}"
|
|
echo_stat
|
|
|
|
git clean -f -X -d >/dev/null 2>&1
|
|
error_validate
|
|
|
|
clear_cron
|
|
|
|
MESSAGE="${UI_PURGE_DELETE_SSH_KEYS}"
|
|
echo_stat
|
|
|
|
rm -f $HOME/${SSH_PKIF} >/dev/null 2>&1
|
|
rm -f $HOME/${SSH_PKIF}.pub >/dev/null 2>&1
|
|
error_validate
|
|
|
|
MESSAGE="${UI_PURGE_MATRIX_ALIGNMENT}"
|
|
echo_info
|
|
|
|
sleep 1
|
|
|
|
update_gs
|
|
} |