aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-05-28 21:41:13 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-05-28 21:41:13 +0200
commit9199eb1dbba77566b6cc54abe93344c308d9c8e7 (patch)
treef2902995b9b4f782124a2618122e94bdfacd0845
parentb07a88ed2d9e42ca49f97b3052ff13aa6e1c35c6 (diff)
downloadltask-9199eb1dbba77566b6cc54abe93344c308d9c8e7.tar.gz
fix
-rwxr-xr-xltask8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltask b/ltask
index 0e10339..c349ec9 100755
--- a/ltask
+++ b/ltask
@@ -109,10 +109,8 @@ for hoststring in "${HOSTS_UNIQUE[@]}"; do
IFS=$':' read hostname port <<< "$hoststring"
[ ! -z $port ] && rexecargs+="-p $port "
- [ ! -z $SSH_IDENTITY_FILE ] && rexecargs+="-i $SSH_IDENTITY_FILE "
- [ ! -z $SSH_USER ] && rexecargs="$SSH_USER@"
-
- [ ${#FILES[@]} -gt 0 ] && scp -P ${port:=22} ${FILES[@]} ${SSH_USER:=$USER}@$hostname:
+ rexecargs+="-i ${SSH_IDENTITY_FILE:=~/.ssh/id_rsa} "
+ [ ! -z $SSH_USER ] && rexecargs+="$SSH_USER@"
rexecargs+="$hostname "
rexecargs+="$TASK_DIR/$TASK"
@@ -120,5 +118,7 @@ for hoststring in "${HOSTS_UNIQUE[@]}"; do
echo
echo "<=== $hostname ===>"
echo
+
+ [ ${#FILES[@]} -gt 0 ] && scp -i ${SSH_IDENTITY_FILE:=~/.ssh/id_rsa} -P ${port:=22} ${FILES[@]} ${SSH_USER:=$USER}@$hostname:
$TOOL_DIR/rexec.sh $rexecargs
done