From 0ff8910ab7b15c2117475d31ad667c9df3db2e32 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 8 May 2018 03:11:14 +0200 Subject: [PATCH] Fix minor error --- remote-copy_gateway-config.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remote-copy_gateway-config.sh b/remote-copy_gateway-config.sh index 32f3f6c..e1003cd 100755 --- a/remote-copy_gateway-config.sh +++ b/remote-copy_gateway-config.sh @@ -449,7 +449,10 @@ fi if [[ -z "$(which realpath)" ]]; then fatal 'It seems "realpath" is not installed, but needed!' fi -n Main Script + + +# ========== +# - Begin Main Script # ========== # ---------- @@ -557,7 +560,7 @@ if $terminal ; then echo "" fi -declare -i remote_dir_count="$(ssh gw-replacement.wf.netz "ls -A ${_network}-config 2> /dev/null | wc -l")" +declare -i remote_dir_count="$(ssh $REMOTE_HOST "ls -A ${_network}-config 2> /dev/null | wc -l")" if [[ $remote_dir_count -lt 1 ]]; then fatal "Remote Directory is empty. Run \033[1mcopy_gateway-config.sh ${_network}\033[m on remote host first." fi @@ -752,4 +755,4 @@ cat $OFFICE_DIR/README.txt #rm /tmp/README$$ -exit 0 +clean_up 0