Skip to content

Commit

Permalink
Spell correction and script fix.
Browse files Browse the repository at this point in the history
Features: control telemetry

Required-githooks: true

Signed-off-by: Samir Raval <[email protected]>
  • Loading branch information
ravalsam committed Sep 30, 2024
1 parent a3bcfc9 commit 91ddce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions utils/certs/gen_telemetry_admin_certificate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ function print_usage () {
DAYS=1095

CA_HOME="${1:-.}/daosTelemetryCA"
# shellcheck disable=SC2128
CONFIGS="$(dirname "${BASH_SOURCE}")"

function setup_directories () {
mkdir -p "${CA_HOME}"
Expand Down
8 changes: 4 additions & 4 deletions utils/certs/gen_telemetry_server_certificate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Please modify to use in Production environment.
Usage: gen_telemetry_server_certificate.sh [USER] [DIR]
USER: DAOS has server and client and the certificate need the specific file permission
based on system usage.
Use "daos_server" if running script on server
Use "daos_agent" if running script on client
Use daos_server if running script on server
Use daos_agent if running script on client
DIR: Generate telemetry certificates for DAOS metrics in the [DIR].
By default [DIR] is the current directory.
Expand Down Expand Up @@ -53,7 +53,7 @@ function generate_server_cert () {
echo "Generating Server Certificate"
# Generate Private key and set its permissions
openssl genrsa -out "${CA_HOME}/telemetryserver.key" 2048
[[ $EUID -eq 0 ]] && chown ${USER}.${USER} "${CA_HOME}/telemetryserver.key"
[[ $EUID -eq 0 ]] && chown "${USER}"."${USER}" "${CA_HOME}/telemetryserver.key"
chmod 0400 "${CA_HOME}/telemetryserver.key"

# Generate a Certificate Signing Request (CRS)
Expand All @@ -65,7 +65,7 @@ function generate_server_cert () {
-CAkey "${CA_HOME}/daosTelemetryCA.key" -CAcreateserial -out "${CA_HOME}/telemetryserver.crt" \
-days ${DAYS} -sha256 -extfile "$CA_HOME/telemetry.cnf" -extensions v3_ext

[[ $EUID -eq 0 ]] && chown ${USER}.${USER} "${CA_HOME}/telemetryserver.crt"
[[ $EUID -eq 0 ]] && chown "${USER}"."${USER}" "${CA_HOME}/telemetryserver.crt"
chmod 0644 "${CA_HOME}/telemetryserver.crt"

echo "Required Server Certificate Files:
Expand Down

0 comments on commit 91ddce3

Please sign in to comment.