aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-19 16:39:46 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-19 16:39:46 +0200
commit1e0b1b4c1271e3668ec5ef1ba58cb84fe00f0f53 (patch)
tree62b148d644ec798918638e88fd8a691563e46f18
parent93ec90a0347a7554e4abea36de8aa70b5b954c3d (diff)
Fix ssh command when execited with a wget pipev0.3.3
-rwxr-xr-xscripts/xds-docker-create-container.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/xds-docker-create-container.sh b/scripts/xds-docker-create-container.sh
index c3c951d..88c74eb 100755
--- a/scripts/xds-docker-create-container.sh
+++ b/scripts/xds-docker-create-container.sh
@@ -176,7 +176,7 @@ echo
docker exec ${NAME} bash -c "mkdir -p /home/$DOCKER_USER/.ssh" || exit 1
docker cp ~/.ssh/id_rsa.pub ${NAME}:/home/$DOCKER_USER/.ssh/authorized_keys || exit 1
docker exec ${NAME} bash -c "chown $DOCKER_USER:$DOCKER_USER -R /home/$DOCKER_USER/.ssh ;chmod 0700 /home/$DOCKER_USER/.ssh; chmod 0600 /home/$DOCKER_USER/.ssh/*" || exit 1
-ssh -o StrictHostKeyChecking=no -p $SSH_PORT $DOCKER_USER@localhost exit || exit 1
+ssh -n -o StrictHostKeyChecking=no -p $SSH_PORT $DOCKER_USER@localhost exit || exit 1
echo "You can now login using:"
echo " ssh -p $SSH_PORT $DOCKER_USER@localhost"
@@ -222,7 +222,7 @@ if ($UPDATE_UID); then
echo -n "."
docker exec -t ${NAME} bash -c "systemctl start autologin"
echo -n "."
- ssh -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user start xds-server" || exit 1
+ ssh -n -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user start xds-server" || exit 1
echo "."
docker restart ${NAME}
fi
@@ -232,7 +232,7 @@ creation_done=true
### Force xds-server restart
if ($FORCE_RESTART); then
echo "Restart xds-server..."
- ssh -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user restart xds-server" || exit 1
+ ssh -n -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user restart xds-server" || exit 1
fi
echo "Done, docker container $NAME is ready to be used."