fix check for env var (#1151)

This commit is contained in:
Wing Lian
2024-01-18 23:58:11 -05:00
committed by GitHub
parent 729740df81
commit cbecf3e62a

View File

@@ -5,8 +5,7 @@ echo "Exporting environment variables..."
printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment
echo 'source /etc/rp_environment' >> ~/.bashrc echo 'source /etc/rp_environment' >> ~/.bashrc
if [[ $PUBLIC_KEY ]] if [[ $PUBLIC_KEY ]]; then
then
# runpod # runpod
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
@@ -14,8 +13,7 @@ then
chmod 700 -R ~/.ssh chmod 700 -R ~/.ssh
# Start the SSH service in the background # Start the SSH service in the background
service ssh start service ssh start
elif [[ $SSH_KEY ]] elif [ -n "$SSH_KEY" ]; then
then
# latitude.sh # latitude.sh
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh