mirror of https://github.com/MISP/misp-packer
chg: Fixed reboot necessity, meaning, just check if reboot works end-of-stage.
new: [cron] Added provisional crontab. Will be augmented greatly, soon(tm)pull/11/head
parent
6c9aa1a0bc
commit
223401d498
|
@ -0,0 +1,6 @@
|
||||||
|
### Very early stage crontab. This will completed soon(tm)
|
||||||
|
#@daily /var/www/MISP/app/Console/cake Server pull [user_id] [server_id] [full|update]
|
||||||
|
#@monthly /var/www/MISP/app/Console/cake Server push [user_id] [server_id]
|
||||||
|
#@hourly /var/www/MISP/app/Console/cake Server fetchFeed [user_id] [feed_id|all|csv|text|misp]
|
||||||
|
#@weekly /var/www/MISP/app/Console/cake Server cacheFeed [user_id] [feed_id|all|csv|text|misp]
|
||||||
|
#@daily /var/www/MISP/app/Console/cake Event enrichEvent [user_id] [event_id] [json_encoded_module_list]
|
|
@ -163,6 +163,11 @@
|
||||||
"script": "scripts/bootstrap.sh",
|
"script": "scripts/bootstrap.sh",
|
||||||
"pause_before": "10s"
|
"pause_before": "10s"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"source" : "conffiles/crontab",
|
||||||
|
"destination": "/tmp/crontab"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source" : "conffiles/issue",
|
"source" : "conffiles/issue",
|
||||||
|
@ -171,7 +176,9 @@
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||||
"script": "scripts/clean.sh"
|
"script": "scripts/clean.sh",
|
||||||
|
"expect_disconnect": "true",
|
||||||
|
"pause_before": "30s"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
cp /tmp/issue /etc/issue
|
mv /tmp/issue /etc/issue
|
||||||
|
mv /tmp/crontab /etc/cron.d/misp
|
||||||
|
|
||||||
# package
|
# package
|
||||||
echo "--- autoremove for apt ---"
|
echo "--- autoremove for apt ---"
|
||||||
|
@ -10,5 +11,6 @@ echo "--- Cleaning packages"
|
||||||
apt-get -y clean > /dev/null 2>&1
|
apt-get -y clean > /dev/null 2>&1
|
||||||
|
|
||||||
# End Cleaning
|
# End Cleaning
|
||||||
echo "VM cleaned"
|
echo "VM cleaned and rebooting for automagic reas0ns."
|
||||||
|
reboot
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue