diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c8a003e..f604b0d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,7 +7,7 @@ assignees: '' --- -**Describe the bug** +**Describe the Issue** A clear and concise description of what the bug is. **Screenshots** @@ -21,5 +21,5 @@ If applicable, add screenshots to help explain your problem. - Gravity Sync Version: [e.g. 1.7.6] - Pi-hole Versions: [e.g. v5.0] -**Additional context** +**Additional Context** Add any other context about the problem here. If you have any advanced flags set in your `gravity-sync.conf` please list them here. diff --git a/gravity-sync.sh b/gravity-sync.sh index 2f6d932..1d0f60d 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -28,6 +28,7 @@ CRONJOB_LOG='gravity-sync.cron' # replace in gravity-sync.conf to overwrite VERIFY_PASS='0' # replace in gravity-sync.conf to overwrite SKIP_CUSTOM='0' # replace in gravity-sync.conf to overwrite DATE_OUTPUT='0' # replace in gravity-sync.conf to overwrite +PING_AVOID='0' # replace in gravity-sync.conf to overwrite # Pi-hole Folder/File Locations PIHOLE_DIR='/etc/pihole' # default Pi-hole data directory @@ -702,7 +703,7 @@ function detect_ssh { else echo_fail MESSAGE="RSYNC is Required" - echo_info + echo_warn distro_check @@ -856,6 +857,18 @@ function config_generate { MESSAGE="Enter IP or DNS of primary Pi-hole server" echo_need read INPUT_REMOTE_HOST + + if [ "${PING_AVOID}" != "1" ] + MESSAGE="Testing Network Connection (PING)" + echo_stat + ping -c 3 ${INPUT_REMOTE_HOST} + if [ "$?" != "127" ] + then + echo_fail + else + echo_good + fi + fi MESSAGE="Enter SSH user with SUDO rights on primary Pi-hole server" echo_need @@ -1323,10 +1336,9 @@ case $# in if [ -f $HOME/${LOCAL_FOLDR}/${CONFIG_FILE} ] then config_delete - else - MESSAGE="${CONFIG_FILE} Missing" - echo_info + MESSAGE="No Active ${CONFIG_FILE}" + echo_warn config_generate fi