diff options
Diffstat (limited to 'backup.in')
-rwxr-xr-x | backup.in | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -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=$! |