Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created August 7, 2022 14:56
Show Gist options
  • Select an option

  • Save KyMidd/1d15eacb0b06afb07f1b3c093c4de3ec to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/1d15eacb0b06afb07f1b3c093c4de3ec to your computer and use it in GitHub Desktop.
#!/bin/bash
# Map secrets based on input
while getopts a:b: flag
do
case "${flag}" in
a) app1-super-secret-json=${OPTARG};;
b) app1-super-secret-string=${OPTARG};;
esac
done
# Print secret
while [ i=i ]
do
echo $app1-super-secret-json
echo $app1-super-secret-string
# Sleep a bit to avoid loop overload
sleep 10
done
trap 'cleanup; exit 130' INT
trap 'cleanup; exit 143' TERM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment