From ace580c522836e5287f4603ceea5da41881a4651 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Wed, 4 Jun 2025 19:33:21 +0100 Subject: replace lfacme-{setup,renew} with a single lfacme command --- lfacme.sh.in | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lfacme.sh.in (limited to 'lfacme.sh.in') diff --git a/lfacme.sh.in b/lfacme.sh.in new file mode 100644 index 0000000..7047097 --- /dev/null +++ b/lfacme.sh.in @@ -0,0 +1,44 @@ +#! /bin/sh +# This source code is released into the public domain. + +# Parse command-line arguments. +args=$(getopt c:v $*) +if [ $? -ne 0 ]; then + exit 1 +fi +set -- $args + +_uacme_flags="" + +while :; do + case "$1" in + -c) + _CONFDIR="$2" + shift; shift;; + -v) + LFACME_VERBOSE=1 + shift;; + -y) + _uacme_flags="$_uacme_flags $1" + shift;; + --) + shift; break;; + esac +done + +# Initialise. +. __LIBDIR__/init.sh + +# Run the command. + +_command="$1"; shift +if [ -z "$command" ]; then + _fatal "missing command" +fi + +_cscript="__LIBDIR__/command/${_command}.sh" +if ! [ -x "$_cscript" ]; then + _fatal "unknown command: %s" "$_command" +fi + +. "$_cscript" -- cgit v1.2.3