Add some scripts and fix small issues

This commit is contained in:
Tobias Reisinger 2023-06-03 03:35:37 +02:00
parent 0e26052058
commit b286596765
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 32 additions and 3 deletions

26
_utils/cert-basic.sh Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env sh
LEGO_WORKING_PATH="/opt/services/.lego/"
set -e
domain="$1"
action="$2" # either "run" or "renew"
if [ -z "$action" ] || [ -z "$domain" ]; then
echo "Usage: $0 <domain> <run|renew>"
exit 1
fi
if [ "$action" != "run" ] && [ "$action" != "renew" ]; then
echo "Usage: $0 <domain> <run|renew>"
exit 1
fi
export ACME_DNS_API_BASE="https://acme.serguzim.me/"
export ACME_DNS_STORAGE_PATH="$LEGO_WORKING_PATH/acme-dns.json"
lego -a --email "tobias@msrg.cc" \
--path "$LEGO_WORKING_PATH" \
--dns "acme-dns" \
--domains "$domain" \
"$action"