From cbecf3e62a81f550adc5067f4947d1890aef90f5 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Thu, 18 Jan 2024 23:58:11 -0500 Subject: [PATCH] fix check for env var (#1151) --- scripts/cloud-entrypoint.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/cloud-entrypoint.sh b/scripts/cloud-entrypoint.sh index f7190b1f5..399eecb81 100755 --- a/scripts/cloud-entrypoint.sh +++ b/scripts/cloud-entrypoint.sh @@ -5,8 +5,7 @@ echo "Exporting environment variables..." printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment echo 'source /etc/rp_environment' >> ~/.bashrc -if [[ $PUBLIC_KEY ]] -then +if [[ $PUBLIC_KEY ]]; then # runpod mkdir -p ~/.ssh chmod 700 ~/.ssh @@ -14,8 +13,7 @@ then chmod 700 -R ~/.ssh # Start the SSH service in the background service ssh start -elif [[ $SSH_KEY ]] -then +elif [ -n "$SSH_KEY" ]; then # latitude.sh mkdir -p ~/.ssh chmod 700 ~/.ssh