Skip to content

Commit

Permalink
Fix for cron issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jjethwa authored Mar 31, 2022
1 parent 665aefd commit c0dfb83
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions content/opt/setup/55-cron
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

. /opt/helpers

if [ ! -f "/etc/cron.d/icinga" ]; then
echo "=> Copying icinga cronfile for /etc/cron.d"
if [ ! -f "/etc/cron.d/icinga/icinga-certs" ]; then
echo "=> Copying icinga-certs cronfile for /etc/cron.d"

mkdir -p /etc/cron.d/icinga
chmod 0644 /etc/cron.d/icinga

cat >/etc/cron.d/icinga <<-END
cat >/etc/cron.d/icinga/icinga-certs <<-END
# If you enabled x509 module you can use the cronjobs to insert/refresh your certificates.
#30 2 * * * /usr/bin/icingacli x509 import --file /etc/ssl/certs/ca-certificates.crt 2>&1
#00 4 * * * /usr/bin/icingacli x509 scan --job <JOBNAME> 2>&1
END

chmod 0644 /etc/cron.d/icinga
chmod 0644 /etc/cron.d/icinga/icinga-certs
fi

0 comments on commit c0dfb83

Please sign in to comment.