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.
|
||||
#
|
||||
# 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
|
||||
|
||||
# Accepted environment variables and their defaults.
|
||||
@@ -27,12 +30,13 @@ MSG_MISSINGYML="Fatal: didn't find the docker-compose.yml file"
|
||||
LANG=C
|
||||
LC_ALL=C
|
||||
|
||||
# Checks the dependencies.
|
||||
# Checks the dependencies (including the worker script's).
|
||||
TR=$(which tr 2>/dev/null)
|
||||
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
|
||||
if [ -n "$(which $item)" ]
|
||||
if [ -n "$(which $item 2>/dev/null)" ]
|
||||
then export $(echo $item | "$TR" '[:lower:]' '[:upper:]' | "$TR" '-' '_')=$(which $item)
|
||||
else echo "$MSG_MISSINGDEP $item." >&2; exit 1; fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user