Modulo makers3d desarrollado con codex V 0.0.1
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CRON_FILE="/etc/cron.d/makers3d-cert-renew"
|
||||
LOG_FILE="/var/log/makers3d-cert-renew.log"
|
||||
|
||||
cat > "${CRON_FILE}" <<EOF
|
||||
SHELL=/bin/bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
17 3,15 * * * root cd ${ROOT_DIR} && ./scripts/renew-certs.sh >> ${LOG_FILE} 2>&1
|
||||
EOF
|
||||
|
||||
chmod 0644 "${CRON_FILE}"
|
||||
touch "${LOG_FILE}"
|
||||
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl restart cron || systemctl restart crond || true
|
||||
fi
|
||||
|
||||
echo "Cron de renovacion instalado en ${CRON_FILE}"
|
||||
Reference in New Issue
Block a user