Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service='api.sys.us-east.big.co'
- username='adam.admin@big.co'
- #get the password from the keychain
- password=$(security find-generic-password -ga "$username" -w)
- #if the security command does not run sucessfully, prompt
- if [ $? -gt 0 ]; then
- echo "Please enter the password for '$username' on '$service': "
- echo -n "Password: "
- stty -echo
- read password
- stty echo
- security add-generic-password -U -a "$username" -s "$service" -w "$password"
- fi
- export CF_API="$service"
- export CF_USER="$username"
- export CF_PASS="$password"
Add Comment
Please, Sign In to add comment