Minor improvements in check_certificates wrapper script.
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
# See https://github.com/Matty9191/ssl-cert-check for details.
|
# See https://github.com/Matty9191/ssl-cert-check for details.
|
||||||
#
|
#
|
||||||
# Author: Kovács Zoltán <kovacsz@marcusconsulting.hu>
|
# Author: Kovács Zoltán <kovacsz@marcusconsulting.hu>
|
||||||
|
# 2026-05-04 v0.2
|
||||||
|
# mod: It now also checks the dependencies of the worker script.
|
||||||
|
# fix: Suppresses error output during 'which' calls.
|
||||||
# 2026-02-16 v0.1 Initial release
|
# 2026-02-16 v0.1 Initial release
|
||||||
|
|
||||||
# Accepted environment variables and their defaults.
|
# Accepted environment variables and their defaults.
|
||||||
@@ -27,12 +30,13 @@ MSG_MISSINGYML="Fatal: didn't find the docker-compose.yml file"
|
|||||||
LANG=C
|
LANG=C
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
# Checks the dependencies.
|
# Checks the dependencies (including the worker script's).
|
||||||
TR=$(which tr 2>/dev/null)
|
TR=$(which tr 2>/dev/null)
|
||||||
if [ -z "$TR" ]; then echo "$MSG_MISSINGDEP tr."; exit 1 ; fi
|
if [ -z "$TR" ]; then echo "$MSG_MISSINGDEP tr."; exit 1 ; fi
|
||||||
for item in basename dirname find readlink
|
for item in basename dirname find readlink \
|
||||||
|
awk date grep mktemp openssl printf
|
||||||
do
|
do
|
||||||
if [ -n "$(which $item)" ]
|
if [ -n "$(which $item 2>/dev/null)" ]
|
||||||
then export $(echo $item | "$TR" '[:lower:]' '[:upper:]' | "$TR" '-' '_')=$(which $item)
|
then export $(echo $item | "$TR" '[:lower:]' '[:upper:]' | "$TR" '-' '_')=$(which $item)
|
||||||
else echo "$MSG_MISSINGDEP $item." >&2; exit 1; fi
|
else echo "$MSG_MISSINGDEP $item." >&2; exit 1; fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user