mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Ping Test on configure input
This commit is contained in:
parent
33632c04b6
commit
47d71fd821
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user