Browse Source

fix: prevent curl failure on unexistent file

This file doesn't seem to have ever existed. We keep the code as it is quick to set
it up again if needed.
master
Valentin Lab 1 year ago
parent
commit
b55600c166
  1. 18
      bin/myc-install

18
bin/myc-install

@ -84,15 +84,15 @@ fi
export PGHOST PGUSER
EOF
if ! [ -s /etc/ssh/vm_git_myceliandre_access_id_rsa ]; then
curl -L --fail https://docker.0k.io/get/vm_git_myceliandre_access_id_rsa > /etc/ssh/vm_git_myceliandre_access_id_rsa || {
echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_myceliandre_access_id_rsa ..." >&2
rm -f /etc/ssh/vm_git_myceliandre_access_id_rsa
exit 1
}
## Not so usefull as it is public !
chmod 0600 /etc/ssh/vm_git_myceliandre_access_id_rsa
fi
# if ! [ -s /etc/ssh/vm_git_myceliandre_access_id_rsa ]; then
# curl -L --fail https://docker.0k.io/get/vm_git_myceliandre_access_id_rsa > /etc/ssh/vm_git_myceliandre_access_id_rsa || {
# echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_myceliandre_access_id_rsa ..." >&2
# rm -f /etc/ssh/vm_git_myceliandre_access_id_rsa
# exit 1
# }
# ## Not so usefull as it is public !
# chmod 0600 /etc/ssh/vm_git_myceliandre_access_id_rsa
# fi
mkdir -p /root/.ssh

Loading…
Cancel
Save