This commit is contained in:
2026-03-19 11:47:17 +03:00
commit baf4d7a906
10 changed files with 369 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -eu
CRON_FILE="/etc/cron.d/certbot-renew"
CRON_SCHEDULE="${CERTBOT_RENEW_SCHEDULE:-17 3,15 * * *}"
mkdir -p /var/www/certbot
chmod +x /usr/local/bin/renew.sh
cat > "$CRON_FILE" <<EOF
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
TZ=${TZ:-UTC}
${CRON_SCHEDULE} root /usr/local/bin/renew.sh >> /var/log/cron.log 2>&1
EOF
chmod 0644 "$CRON_FILE"
touch /var/log/cron.log
cron
exec nginx -g 'daemon off;'