From 3de70296a0fb00baf15a724657fd527690b8a815 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 8 Jan 2025 13:32:10 +0100 Subject: [PATCH 1/2] show dir in help output --- cm.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cm.sh b/cm.sh index 0233cd7..af58603 100755 --- a/cm.sh +++ b/cm.sh @@ -927,6 +927,9 @@ function public_transfer(){ cd $( dirname $0 ) +test -z "${CM_diracme}" && CM_diracme=./certs +test -z "${CM_dircsr}" && CM_dircsr=./csr + cat <<ENDOFHEADER $line @@ -937,7 +940,6 @@ $line ENDOFHEADER - while [[ "$#" -gt 0 ]]; do case $1 in -a|--alias) @@ -991,8 +993,6 @@ while [[ "$#" -gt 0 ]]; do case $1 in ;; esac; done -which openssl >/dev/null || exit 1 - . ./inc_config.sh if [ $? -ne 0 ]; then _we "Loading the config failed." @@ -1001,12 +1001,11 @@ if [ $? -ne 0 ]; then exit 1 fi +which openssl >/dev/null || exit 1 + _testUser _testStaging -test -z "${CM_diracme}" && CM_diracme=./certs -test -z "${CM_dircsr}" && CM_dircsr=./csr - grep "function public_$1" "$( basename "$0" )" >/dev/null if [ $# -gt 0 -a $? -eq 0 ]; then # _wd $* -- GitLab From 2a71cfe2f4479830c8dad3f3942f51fe3d43b878 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 8 Jan 2025 13:33:03 +0100 Subject: [PATCH 2/2] update docs --- docs/30_Usage.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/30_Usage.md b/docs/30_Usage.md index f172c21..e111535 100644 --- a/docs/30_Usage.md +++ b/docs/30_Usage.md @@ -14,7 +14,7 @@ Without -h or --help it shows a help. _______________________________________________________________________________ - - - - ---===>>> CERT MANAGER - v2025-01-08 <<<===--- - - - + - - - ---===>>> CERT MANAGER - v2025-01-08 <<<===--- - - - _______________________________________________________________________________ @@ -31,7 +31,7 @@ certificate must be created, renewed or re-created. SYNTAX: - dev_cm.sh [OPTIONS] ACTION <FQDN> [<ALIASES>] + cm.sh [OPTIONS] ACTION <FQDN> [<ALIASES>] OPTIONS: @@ -62,7 +62,7 @@ The ACTIONs for SINGLE certificate handlings are: The first FQDN is a hostname to generate the certificate for. Following multiple hostnames will be used as DNS aliases in the same certificate. - It updates files in + It updates files in ./certs ensure <FQDN> [.. <FQDN-N>] It ensures that a certificate with given aliases exists and is up to date. @@ -81,7 +81,7 @@ The ACTIONs for SINGLE certificate handlings are: renew <FQDN> renew (an already added) certificate - and update files in + and update files in ./certs show <FQDN> show place of certificate data and show basic certificate data @@ -105,7 +105,7 @@ ACTIONs for ALL certs renew-all renew all certificates (fast mode - without --force) - and update files in + and update files in ./certs It is useful for a cronjob. other ACTIONs -- GitLab