Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #unattended_ubuntu
- source ../src/common.sh
- #Check for pgp
- function get_user_input_pgp_key(){
- echo "Enter the name or ID of the pgp key that you would like to use"
- read pgp_key_to_test
- echo
- }
- function check_if_the_key_exists(){
- if [[ $(gpg -k $pgp_key_to_test ) = "gpg: error reading key: No public key" ]]; then
- echo "No Key"
- else
- echo "Key Good"
- fi
- }
- function run_it(){
- get_user_input_pgp_key
- check_if_the_key_exists
- }
- run_it
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement