Skip to content

Commit

Permalink
Merge branch 'master' into shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 17, 2020
2 parents 533f1ca + 5b1397c commit a847989
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ generate_certificates() (

# update host to trust registry certificate
if ! cmp --quiet "$STATEDIR/certs/ca.pem" "$certs_dir/tinkerbell.crt"; then
if [ ! -d "$certs_dir/tinkerbell.crt" ]; then
# The user will be told to create the directory
# in the next block, if copying the certs there
# fails.
mkdir -p "$certs_dir" || true >/dev/null 2>&1
fi
if ! cp "$STATEDIR/certs/ca.pem" "$certs_dir/tinkerbell.crt"; then
echo "$ERR please copy $STATEDIR/certs/ca.pem to $certs_dir/tinkerbell.crt"
echo "$BLANK and run $0 again:"
Expand Down Expand Up @@ -442,7 +448,6 @@ check_prerequisites() (
failed=0
check_command docker || failed=1
check_command docker-compose || failed=1
check_command git || failed=1
check_command ip || failed=1
check_command jq || failed=1

Expand Down

0 comments on commit a847989

Please sign in to comment.