Testing for archive reachability is different for each archive system, but necessary for all systems.

This commit is contained in:
cimryan
2018-11-03 17:31:28 -07:00
parent 42da3ad9d2
commit 2eec8864c8
5 changed files with 17 additions and 1 deletions

View File

@@ -26,7 +26,9 @@ function fix_errors_in_mounted_files () {
function archive_is_reachable () {
local reachable=true
hping3 -c 1 -S -p 445 "$ARCHIVE_HOST_NAME" > /dev/null 2>&1 || reachable=false
/root/bin/archive-is-reachable.sh || reachable=false
if [ "$reachable" = false ]
then
false

View File

@@ -0,0 +1,5 @@
#!/bin/bash -eu
ARCHIVE_HOST_NAME="$1"
hping3 -c 1 -S -p 445 "$ARCHIVE_HOST_NAME" > /dev/null 2>&1

View File

@@ -0,0 +1,3 @@
#!/bin/bash -eu
ping -q -w 1 -c 1 8.8.8.8 > /dev/null 2>&1

View File

@@ -0,0 +1,5 @@
#!/bin/bash -eu
ARCHIVE_HOST_NAME="$1"
ping -q -w 1 -c 1 "$ARCHIVE_HOST_NAME" > /dev/null 2>&1