Files
drone-detector/docker/certbot/entrypoint.sh
2025-09-13 08:54:16 +02:00

27 lines
591 B
Bash

#!/bin/bash
# Entrypoint script for certbot container
set -e
echo "Starting Certbot Auto-Renewal Container"
echo "========================================="
# Create log directory
mkdir -p /var/log/certbot
# Set up environment
export DOMAIN="${DOMAIN:-dev.uggla.uamils.com}"
export EMAIL="${EMAIL:-admin@uggla.uamils.com}"
export RENEWAL_DAYS="${RENEWAL_DAYS:-10}"
echo "Domain: $DOMAIN"
echo "Email: $EMAIL"
echo "Renewal threshold: $RENEWAL_DAYS days"
# Initial certificate check/creation
/app/scripts/check-and-renew.sh
# Start cron daemon
echo "Starting cron daemon..."
exec "$@"