]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
add --display-terms to display the URL for the current ToS
authorDaniel Molkentin <dmolkentin@suse.com>
Mon, 28 Sep 2020 14:44:36 +0000 (16:44 +0200)
committerLukas Schauer <lukas@schauer.so>
Fri, 13 Nov 2020 19:47:49 +0000 (20:47 +0100)
Implements #649

dehydrated

index cff579c2d546b0455cbd4095490491c2e21b00a6..5ae6de12d760bd29b23966fa9e6b5075f6d86efa 100755 (executable)
@@ -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