winglian commited on
Commit
cbecf3e
1 Parent(s): 729740d

fix check for env var (#1151)

Browse files
Files changed (1) hide show
  1. scripts/cloud-entrypoint.sh +2 -4
scripts/cloud-entrypoint.sh CHANGED
@@ -5,8 +5,7 @@ echo "Exporting environment variables..."
5
  printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment
6
  echo 'source /etc/rp_environment' >> ~/.bashrc
7
 
8
- if [[ $PUBLIC_KEY ]]
9
- then
10
  # runpod
11
  mkdir -p ~/.ssh
12
  chmod 700 ~/.ssh
@@ -14,8 +13,7 @@ then
14
  chmod 700 -R ~/.ssh
15
  # Start the SSH service in the background
16
  service ssh start
17
- elif [[ $SSH_KEY ]]
18
- then
19
  # latitude.sh
20
  mkdir -p ~/.ssh
21
  chmod 700 ~/.ssh
 
5
  printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment
6
  echo 'source /etc/rp_environment' >> ~/.bashrc
7
 
8
+ if [[ $PUBLIC_KEY ]]; then
 
9
  # runpod
10
  mkdir -p ~/.ssh
11
  chmod 700 ~/.ssh
 
13
  chmod 700 -R ~/.ssh
14
  # Start the SSH service in the background
15
  service ssh start
16
+ elif [ -n "$SSH_KEY" ]; then
 
17
  # latitude.sh
18
  mkdir -p ~/.ssh
19
  chmod 700 ~/.ssh