From: Daniel Molkentin Date: Mon, 28 Sep 2020 14:44:36 +0000 (+0200) Subject: add --display-terms to display the URL for the current ToS X-Git-Tag: v0.7.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cc9e2d07f8f1a2a1144e0d865dbf8fec75806d3;p=thirdparty%2Fdehydrated.git add --display-terms to display the URL for the current ToS Implements #649 --- diff --git a/dehydrated b/dehydrated index cff579c..5ae6de1 100755 --- a/dehydrated +++ b/dehydrated @@ -1451,6 +1451,15 @@ command_version() { exit 0 } +# Usage: --display-terms +# Description: Display current terms of service +command_terms() { + init_system + echo "The current terms of service: $CA_TERMS" + echo "+ Done!" + exit 0 +} + # Usage: --register # Description: Register account key command_register() { @@ -1978,6 +1987,10 @@ main() { PARAM_ACCEPT_TERMS="yes" ;; + --display-terms) + set_command terms + ;; + --signcsr|-s) shift 1 set_command sign_csr @@ -2147,7 +2160,6 @@ main() { check_parameters "${1:-}" PARAM_KEY_ALGO="${1}" ;; - *) echo "Unknown parameter detected: ${1}" >&2 echo >&2 @@ -2168,6 +2180,7 @@ main() { revoke) command_revoke "${PARAM_REVOKECERT}";; deactivate) command_deactivate;; cleanup) command_cleanup;; + terms) command_terms;; version) command_version;; *) command_help; exit 1;; esac