mirror of https://github.com/MISP/misp-packer
chg: [INSTALL] misp-packer now users INSTALL.sh by default
parent
2b9b065ee4
commit
15b0f42c2e
|
@ -1,3 +1,4 @@
|
|||
packer_cache/
|
||||
output-virtualbox-iso/
|
||||
scripts/INSTALL.sh
|
||||
*.checksum
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
# Fetching latest MISP LICENSE
|
||||
/usr/bin/wget -q -O /tmp/LICENSE-misp https://raw.githubusercontent.com/MISP/MISP/2.4/LICENSE
|
||||
[[ ! -f /tmp/LICENSE-misp ]] && wget -q -O /tmp/LICENSE-misp https://raw.githubusercontent.com/MISP/MISP/2.4/LICENSE
|
||||
packer build -only=virtualbox-iso misp.json
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
# Timing creation
|
||||
TIME_START=$(date +%s)
|
||||
|
||||
# Place holder
|
||||
function checkBin()
|
||||
{
|
||||
echo "NOOP"
|
||||
}
|
||||
|
||||
# Latest version of misp
|
||||
VER=$(curl -s https://api.github.com/repos/MISP/MISP/tags |jq -r '.[0] | .name')
|
||||
# Latest commit hash of misp
|
||||
|
@ -98,6 +104,9 @@ removeAll 2> /dev/null
|
|||
# Fetching latest MISP LICENSE
|
||||
/usr/bin/wget -q -O /tmp/LICENSE-${PACKER_NAME} https://raw.githubusercontent.com/MISP/MISP/2.4/LICENSE
|
||||
|
||||
# Fetch the latest MISP Installer
|
||||
/usr/bin/wget -q -O scripts/INSTALL.sh https://raw.githubusercontent.com/MISP/MISP/2.4/INSTALL/INSTALL.sh
|
||||
|
||||
# Check if latest build is still up to date, if not, roll and deploy new
|
||||
if [ "${LATEST_COMMIT}" != "$(cat /tmp/misp-latest.sha)" ]; then
|
||||
|
||||
|
|
12
misp.json
12
misp.json
|
@ -157,10 +157,18 @@
|
|||
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||
"script": "scripts/interfaces.sh"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source" : "scripts/INSTALL.sh",
|
||||
"destination": "/tmp/INSTALL.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||
"script": "scripts/bootstrap.sh",
|
||||
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -u {{user `ssh_name`}} -E -S bash '{{ .Path }}'",
|
||||
"inline": [
|
||||
"chmod u+x /tmp/INSTALL.sh",
|
||||
"/tmp/INSTALL.sh -A"
|
||||
],
|
||||
"pause_before": "10s"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
## This file is AUTOGENERATED.
|
||||
## /!\ Do NOT Change the contents of the file.
|
||||
## To generate it you need a copy of the main MISP repo.
|
||||
## As a quick reference, you cat generate with xsnippet:
|
||||
# $ xsnippet /tmp/ $PATH_TO_MISP/docs/generic/ethX.md
|
||||
# $ cp /tmp/interfaces.sh .
|
||||
|
||||
echo "--- Using old style name (ethX) for interfaces"
|
||||
sed -r 's/^(GRUB_CMDLINE_LINUX=).*/\1\"net\.ifnames=0\ biosdevname=0\"/' /etc/default/grub | sudo tee /etc/default/grub > /dev/null
|
||||
|
||||
|
||||
# install ifupdown since ubuntu 18.04
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ifupdown
|
||||
|
||||
|
||||
# enable eth0
|
||||
echo "--- Configuring eth0"
|
||||
|
||||
|
@ -18,5 +23,4 @@ auto eth0
|
|||
iface eth0 inet dhcp
|
||||
EOF
|
||||
|
||||
|
||||
update-grub > /dev/null 2>&1
|
||||
|
|
Loading…
Reference in New Issue