summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-26 23:33:21 +0200
committerErich Eckner <git@eckner.net>2019-07-26 23:33:21 +0200
commit4b11548dc8a970e5040f32b41a2c5744296d100e (patch)
tree95d3a1e964f364af9e416d6ae6dca55b8f58ebe6
parentdb5793f33fda7b2d7feb38cb03426dfc236ff979 (diff)
downloadhardlinkedBackups-4b11548dc8a970e5040f32b41a2c5744296d100e.tar.xz
backup.in: wait for 20 seconds, print what failed on failure
-rwxr-xr-xbackup.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/backup.in b/backup.in
index b74487a..6e08d9e 100755
--- a/backup.in
+++ b/backup.in
@@ -188,13 +188,15 @@ fi
echo $$ > "${pidFile}"
if [ -n "${HoppIP}" ]; then
- if ! ping -c1 -${ipVer} "$(extract_ssh_host "${HoppIP}")" >/dev/null; then
+ if ! ping -c 1 -W 20 -${ipVer} "$(extract_ssh_host "${HoppIP}")" >/dev/null; then
rm "${pidFile}"
+ >&2 echo "cannot ping -c 1 -W 20 -${ipVer} $(extract_ssh_host "${HoppIP}")"
exit 11
fi
elif [ -n "${QuellIP}" ]; then
- if ! ping -c1 -${ipVer} "$(extract_ssh_host "${QuellIP}")" >/dev/null; then
+ if ! ping -c 1 -W 20 -${ipVer} "$(extract_ssh_host "${QuellIP}")" >/dev/null; then
rm "${pidFile}"
+ >&2 echo "cannot ping -c 1 -W 20 -${ipVer} $(extract_ssh_host "${QuellIP}")"
exit 11
fi
fi