-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamically create crontab entries based on cake output for sync servers #100
base: master
Are you sure you want to change the base?
Conversation
What do you think about putting this in its own container? |
I'm going to think about this one a bit more. Couple notes:
I think the entire cron thing needs to be looked at - so we're not forcing people into doing things they may want to change. Like, if there's a volume mounted cron file, don't make a new one, etc. |
20 2 * * * www-data /var/www/MISP/app/Console/cake Server cacheFeed "$CRON_USER_ID" all >/tmp/cronlog 2>/tmp/cronlog | ||
30 2 * * * www-data /var/www/MISP/app/Console/cake Server fetchFeed "$CRON_USER_ID" all >/tmp/cronlog 2>/tmp/cronlog | ||
|
||
00 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateGalaxies >/tmp/cronlog 2>/tmp/cronlog | ||
10 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateTaxonomies >/tmp/cronlog 2>/tmp/cronlog | ||
20 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateWarningLists >/tmp/cronlog 2>/tmp/cronlog | ||
30 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateNoticeLists >/tmp/cronlog 2>/tmp/cronlog | ||
45 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateObjectTemplates >/tmp/cronlog 2>/tmp/cronlog | ||
45 3 * * * www-data /var/www/MISP/app/Console/cake Admin updateObjectTemplates 1 >/tmp/cronlog 2>/tmp/cronlog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this "1" the same as the CRON_USER_ID a few lines up (which defaults to 1) or something entirely different?
👍 I would not like to sync all servers. I actually don't use |
Hello @coolacid,
I have created this pull request to to allow the crontabs for MISP to be generated automatically based on configured Sync Servers in MISP.
added dependencies:
curl
This is needed because the crontab entrypoint needs to wait for nginx to startup. Otherwise the command
cake Server listServers
will fail. The MySQL Database is not ready at an earlier stage.Is there a scenario where nginx will only listen on port 80? Then this will not work.
jq
This is needed for parsing the JSON output of the command
cake Server listServers
Allows the removal of the environment variable:
SYNCSERVERS
One thing to point out is that adding / removing sync servers from MISP requires a restart of the container. (It actually does in this version and in the one before as well. So not really a change. )
Also fixes:
https://github.com/coolacid/docker-misp/issues/99