From db826c6c63cb47a8eef8683709bfd5186a8bb0f4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 28 Jul 2022 12:07:20 +0200 Subject: [PATCH] Add comandlline flag '-q' for silent run of scripts 'dehydrated_cron.sh' and 'change_ssl_directives.sh'. --- install_dehydrated.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/install_dehydrated.sh b/install_dehydrated.sh index bcff7ae..32ef47e 100755 --- a/install_dehydrated.sh +++ b/install_dehydrated.sh @@ -1571,6 +1571,20 @@ else verbose=false fi + +# ------------- +# - Read Commanline Arguments +# ------------- + +# If option '-q' is present, be silent, even if running in a terminal +# +while getopts q opt ; do + case \$opt in + q) verbose=false ;; + esac +done + + # -Is systemd supported on this system? # - systemd_supported=false @@ -3432,6 +3446,20 @@ else terminal=false fi + +# ------------- +# - Read Commanline Arguments +# ------------- + +# If option '-q' is present, be silent, even if running in a terminal +# +while getopts q opt ; do + case \$opt in + q) terminal=false ;; + esac +done + + if \$terminal ; then clear echo ""