Skip to content

Commit

Permalink
fix check for env var (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored Jan 19, 2024
1 parent 729740d commit cbecf3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/cloud-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ 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
echo $PUBLIC_KEY >> ~/.ssh/authorized_keys
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
Expand Down

0 comments on commit cbecf3e

Please sign in to comment.