diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-04 19:33:21 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-04 19:33:21 +0100 |
| commit | ace580c522836e5287f4603ceea5da41881a4651 (patch) | |
| tree | baf0ed9518439f94c57570b5b2272d2b2329845e /lfacme.sh.in | |
| parent | 81ea52277cfe0396d4a2a2a2cc3ab9e98c3c99f7 (diff) | |
| download | lfacme-ace580c522836e5287f4603ceea5da41881a4651.tar.gz lfacme-ace580c522836e5287f4603ceea5da41881a4651.tar.bz2 | |
replace lfacme-{setup,renew} with a single lfacme command
Diffstat (limited to 'lfacme.sh.in')
| -rw-r--r-- | lfacme.sh.in | 44 |
1 files changed, 44 insertions, 0 deletions
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" |
