fix check for env var (#1151)
Browse files
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 [
|
| 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
|