summaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
Diffstat (limited to 'backup.in')
-rwxr-xr-xbackup.in20
1 files changed, 13 insertions, 7 deletions
diff --git a/backup.in b/backup.in
index 3caf3ca..b6d87b7 100755
--- a/backup.in
+++ b/backup.in
@@ -68,13 +68,6 @@ else
usage
fi
-if [ -n "${QuellIP}" ]; then
- ping -c1 ${QuellIP} > /dev/null || exit 11
-fi
-if [ -n "${HoppIP}" ]; then
- ping -c1 ${HoppIP} > /dev/null || exit 11
-fi
-
if [ ! -d ${Basis} ]; then
for neededMount in "${neededMounts[@]}"; do
if ! mountpoint -q "${neededMount}"; then
@@ -109,6 +102,19 @@ fi
echo $$ > "${pidFile}"
+if [ -n "${QuellIP}" ]; then
+ if ! ping -c1 ${QuellIP} >/dev/null; then
+ rm "${pidFile}"
+ exit 11
+ fi
+fi
+if [ -n "${HoppIP}" ]; then
+ if ! ping -c1 ${HoppIP} >/dev/null; then
+ rm "${pidFile}"
+ exit 11
+ fi
+fi
+
if [ -n "${tunnelBefehl}" ]; then
${tunnelBefehl} &
backgroundPid=$!