checking for crt before setting up service

This commit is contained in:
John Lancaster
2025-12-28 23:49:28 -06:00
parent 11efff6829
commit 8000b32cea

View File

@@ -128,6 +128,11 @@ export KEY_LOCATION=$(readlink -f $KEY_LOCATION)
# 2. Confirm # 2. Confirm
confirm_inputs "CERT_LOCATION" "KEY_LOCATION" confirm_inputs "CERT_LOCATION" "KEY_LOCATION"
if [ ! -f "$CERT_LOCATION" ] || [ ! -f "$KEY_LOCATION" ]; then
log_error "Certificate or key file does not exist at specified locations."
exit 1
fi
# 3. Configure # 3. Configure
REPO_URL_BASE=https://gitea.john-stream.com/john/soteria/raw/branch/main/ REPO_URL_BASE=https://gitea.john-stream.com/john/soteria/raw/branch/main/
SERVICE_TEMPLATE_URL="${REPO_URL_BASE}systemd/cert-renewer.service" SERVICE_TEMPLATE_URL="${REPO_URL_BASE}systemd/cert-renewer.service"