-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from Toutzn/master
enable cron support
- Loading branch information
Showing
7 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[program:crond] | ||
command = /opt/supervisor/cron_supervisor | ||
autostart = true | ||
autorestart = true | ||
stdout_logfile = /dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile = /dev/stderr | ||
stderr_logfile_maxbytes = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
. /opt/helpers | ||
|
||
if [ ! -f "/etc/cron.d/icinga" ]; then | ||
echo "=> Copying icinga cronfile for /etc/cron.d" | ||
|
||
cat >/etc/cron.d/icinga <<-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 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
. /opt/helpers | ||
|
||
service cron start | ||
|
||
# Allow any signal which would kill a process to stop server | ||
trap "service cron stop" HUP INT QUIT ABRT ALRM TERM TSTP | ||
|
||
while pgrep -u root cron > /dev/null; do sleep 5; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters