Skip to content

Commit

Permalink
Simplify script parameter check conditional logic
Browse files Browse the repository at this point in the history
Co-authored-by: Nick <[email protected]>
  • Loading branch information
dav3r and mcdonnnj committed Aug 15, 2024
1 parent e9fd8d2 commit 6dbb2e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/gather_key_cyhy_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ set -o nounset
set -o errexit
set -o pipefail

if [ $# -eq 5 ]; then
cyhy_db_fqdn=$1
cyhy_reporter_fqdn=$2
cyhy_mongodb_uri=$3
cyhy_mongodb_username=$4
cyhy_mongodb_password=$5
else
if [ $# -ne 5 ]; then
cat << END_OF_LINE
Usage: ${0##*/} cyhy_db_fqdn cyhy_reporter_fqdn cyhy_mongodb_uri cyhy_mongodb_username cyhy_mongodb_password
Expand All @@ -45,6 +39,12 @@ END_OF_LINE
exit 1
fi

cyhy_db_fqdn=$1
cyhy_reporter_fqdn=$2
cyhy_mongodb_uri=$3
cyhy_mongodb_username=$4
cyhy_mongodb_password=$5

today=$(date +%Y-%m-%d)

# COMMANDER MAIN LOOP DURATION METRICS
Expand Down

0 comments on commit 6dbb2e6

Please sign in to comment.