diff options
author | Erich Eckner <git@eckner.net> | 2019-01-21 09:14:06 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-21 09:14:06 +0100 |
commit | 5526fedab7cf69432f4643e58566367d49efeeed (patch) | |
tree | 87f9e3a05d875e4efdbe4b133435fc5ab9892f81 /backup.in | |
parent | 42ba782994b2dc269987160055a019c47e7c29f4 (diff) | |
download | hardlinkedBackups-5526fedab7cf69432f4643e58566367d49efeeed.tar.xz |
backup.in: check for availability of client _after_ checking that there is no recent backup
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=$! |