Merge dcdbfd0cbea5523061eade80b164a358e4f10074 into 9b267bb5725eca0b2b8f34682aca89f5d3fbcb5e

This commit is contained in:
Max Christian Pohle 2025-04-21 00:41:12 +02:00 committed by GitHub
commit 5d9e6f73a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

43
deploy/minio.sh Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env sh
#
# Here is a script to deploy cert to minio server. This script can be called
# directly to test its configuration and see if its dependencies are installed.
# It requires the environment variable MINIO_CERTS_PATH to be set to the path
# where minio stores its certificates (--certs-dir). These must be supported by
# go. The documentation has recommendations under #supported-tls-cipher-suites,
# see: https://min.io/docs/minio/linux/operations/network-encryption.html
#
#
# MINIO_CERTS_PATH defaults to:
# * FreeBSD: /usr/local/etc/minio/certs/
# * Linux: ${HOME}/.minio/certs
#
## public functions ####################
minio_test() {
test "$MINIO_CERTS_PATH" ||
(echo 'environment variable MINIO_CERTS_PATH is required.' && kill $$)
test -x "$(which openssl)" ||
(echo 'no openssl installed, but required.' && kill $$)
echo "All tests ok."
}
# $1=domain $2=keyfile $3=certfile $4=cafile $5=fullchain
minio_deploy() {
openssl x509 \
-in "$3" \
-outform PEM \
-out "$MINIO_CERTS_PATH/public.crt" ||
return 1
openssl ec \
-in "$2" \
-out "$MINIO_CERTS_PATH/private.key" ||
return 1
return 0
}
minio_test