Skip to content
Snippets Groups Projects
Commit 1dd06659 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

added param --trace as 1st param

parent 6ef2e2c1
Branches
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# 2021-06-24 <axel.hahn@iml.unibe.ch> added transfer command; delete files if acme.sh --install-cert ... failes # 2021-06-24 <axel.hahn@iml.unibe.ch> added transfer command; delete files if acme.sh --install-cert ... failes
# 2021-07-14 <axel.hahn@iml.unibe.ch> added _wait_for_free_slot in cert actions to execute multiple processes sequentially # 2021-07-14 <axel.hahn@iml.unibe.ch> added _wait_for_free_slot in cert actions to execute multiple processes sequentially
# 2021-09-27 <axel.hahn@iml.unibe.ch> softer behaviour: do not revoke changed certs (add does not stop; ensure does not delete) # 2021-09-27 <axel.hahn@iml.unibe.ch> softer behaviour: do not revoke changed certs (add does not stop; ensure does not delete)
# 2021-12-23 <axel.hahn@iml.unibe.ch> added param --trace as 1st param to generate a trace log
# ====================================================================== # ======================================================================
...@@ -32,8 +33,9 @@ ...@@ -32,8 +33,9 @@
# #
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
touchfile="./log/lastchange.txt" logdir="./log"
logfile="./log/certmanager.log" touchfile="$logdir/lastchange.txt"
logfile="$logdir/certmanager.log"
csrfile="./templates/csr.txt" csrfile="./templates/csr.txt"
...@@ -569,6 +571,19 @@ function public_transfer(){ ...@@ -569,6 +571,19 @@ function public_transfer(){
cd $( dirname $0 ) cd $( dirname $0 )
if [ "$1" = "--trace" ]; then
tracelog="$logdir/trace__$2__$3__`date +%Y-%m-%d__%H-%M-%S`.log"
exec > >(tee -a ${tracelog} )
exec 2> >(tee -a ${tracelog} >&2)
echo "TRACELOG was triggered."
echo "TIME : $(date)"
echo "COMMAND: $0 $*"
echo "LOG : $tracelog"
# set -vx
shift 1
fi
cat <<ENDOFHEADER cat <<ENDOFHEADER
$line $line
...@@ -621,7 +636,7 @@ else ...@@ -621,7 +636,7 @@ else
HELP HELP
The basic syntax is The basic syntax is
$self ACTION [FQDN] [ALIAS_1 [.. ALIAS_N]] $self [--trace] ACTION [FQDN] [ALIAS_1 [.. ALIAS_N]]
The ACTIONs for SINGLE certificate handlings are: The ACTIONs for SINGLE certificate handlings are:
...@@ -675,6 +690,11 @@ other ACTIONs ...@@ -675,6 +690,11 @@ other ACTIONs
check of health with current setup and requirements. check of health with current setup and requirements.
This command is helpful for initial setups. This command is helpful for initial setups.
OPTIONS
--trace (it must be the 1st parameter)
the output additionally will be written into a tracelog file
below $logdir.
EOF EOF
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment