123456789101112 |
- #!/bin/bash
- # get Email Secret ID :
- last_id=$( ./ovh-bash get me/notification/email/history | jq 'last(.[])' )
- secret_id=$( ./ovh-bash get me/notification/email/history/${last_id} | jq -r '.body' | awk '/secret/ { split($NF,a,"=") ; print a[2] }' )
- # retrieve or set Password from email link
- vps_password=$( ./ovh-bash post secret/retrieve '{ "id": "'${secret_id}'" }' | jq -r '.secret' )
- echo "${vps_password}"
- exit $?
|