diff --git a/Dockers/remote-react-container/entrypoint.sh b/Dockers/remote-react-container/entrypoint.sh index 52ad9cf..0ddf864 100644 --- a/Dockers/remote-react-container/entrypoint.sh +++ b/Dockers/remote-react-container/entrypoint.sh @@ -80,9 +80,8 @@ git config --global user.email $GIT_EMAIL # Get the hostname of the machine HOSTNAME=$(hostname) -## If teleport token is set, join the server -if [ -n "$TELEPORT_TOKEN" ]; then - rm -rf /etc/teleport.yaml +## If teleport token is set and there is no teleport.yaml file, create one +if [ -n "$TELEPORT_TOKEN" ] && [! -f /etc/teleport.yaml]; then teleport configure --roles=node --token=$TELEPORT_TOKEN --proxy=$TELEPORT_URL --no-acme -o file echo "Created teleport configuration file" fi