Kaynağa Gözat

update end of scripts

volixer 5 ay önce
ebeveyn
işleme
32fc92a3b1

+ 3 - 1
scripts/bash/getImageDetails

@@ -5,4 +5,6 @@ request=$( ./ovh-bash get vps/${SRV}/images/current | jq '.' )
 #image_id=$( echo "${request}" | jq -r '.id' )
 #image_name=$( echo "${request}" | jq -r '.id' )
 
-echo "${request}"
+echo "${request}"
+
+exit $?

+ 3 - 1
scripts/bash/getSSHKeys

@@ -2,4 +2,6 @@
 
 KEY_NAME="${1:?need a SSHKey name from /me}"
 
-./ovh-bash get "me/sshKey/${KEY_NAME}"
+./ovh-bash get "me/sshKey/${KEY_NAME}"
+
+exit $?

+ 0 - 1
scripts/bash/getSecret

@@ -9,5 +9,4 @@ vps_password=$( ./ovh-bash post secret/retrieve '{ "id": "'${secret_id}'" }' | j
 
 echo "${vps_password}"
 
-
 exit $?

+ 1 - 2
scripts/bash/ovh-bash

@@ -43,5 +43,4 @@ curl -sL -X "${HTTP_METHOD^^}" \
 	--data "${HTTP_PAYLOAD}" "${HTTP_QUERY}" \
 	| jq '.'
 
-exit $?
-
+exit $?

+ 2 - 0
scripts/bash/vpsReinstall

@@ -9,3 +9,5 @@ image_id=$( ./getImageDetails "${SRV}" | jq -r '.id' )
 HTTP_PAYLOAD='{ "doNotSendPassword": true, "publicSshKey": "'${sshpubkey}'", "imageId": "'${image_id}'" }'
 
 ./ovh-bash post "vps/${SRV}/rebuild" "${HTTP_PAYLOAD}"
+
+exit $?