From 80417468fa73065564b25844b826f03df52f0b45 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Wed, 6 Dec 2017 15:28:00 +0100 Subject: [PATCH] - Various tweaks to scripts --- README.md | 5 +++++ deploy.sh | 2 ++ scripts/bootstrap.sh | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bb3a95a..70852d1 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,10 @@ You can also launch all builders in parallel. $ TAG=$(curl https://api.github.com/repos/MISP/MISP/releases/latest | jq -r '.tag_name') $ ./upload.sh github_api_token=$GITHUB_AUTH_TOKEN owner=MISP repo=MISP tag=$TAG filename=./output-virtualbox-iso/MISP_demo.ova +## Upload latest release + +curl -s https://api.github.com/repos/MISP/MISP/tags |jq -r '.[0] | .name' + + You can add these lines in the *post-processors* section of the file *misp.json* if you want to automate the process. diff --git a/deploy.sh b/deploy.sh index bbd68e4..0df4180 100755 --- a/deploy.sh +++ b/deploy.sh @@ -59,6 +59,7 @@ if [ "${LATEST_COMMIT}" != "$(cat /tmp/misp-latest.sha)" ]; then rsync -azv --progress ${FILE}.asc ${REL_USER}@${REL_SERVER}:export/MISP_${VER}@${LATEST_COMMIT} ssh ${REL_USER}@${REL_SERVER} rm export/latest ssh ${REL_USER}@${REL_SERVER} ln -s MISP_${VER}@${LATEST_COMMIT} export/latest + ssh ${REL_USER}@${REL_SERVER} chmod -R +r export done # Remove files for next run @@ -70,6 +71,7 @@ if [ "${LATEST_COMMIT}" != "$(cat /tmp/misp-latest.sha)" ]; then rm packer_virtualbox-iso_virtualbox-iso_sha256.checksum.asc rm packer_virtualbox-iso_virtualbox-iso_sha384.checksum.asc rm packer_virtualbox-iso_virtualbox-iso_sha512.checksum.asc + rm MISP_${VER}@${LATEST_COMMIT}-vmware.zip.asc echo ${LATEST_COMMIT} > /tmp/misp-latest.sha else echo "Current MISP version ${VER}@${LATEST_COMMIT} is up to date." diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 2a65e2f..fe59df9 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -277,7 +277,8 @@ EOF sudo chown -R www-data:www-data $PATH_TO_MISP/app/Config sudo chmod -R 750 $PATH_TO_MISP/app/Config # Set some MISP directives with the command line tool -sudo $PATH_TO_MISP/app/Console/cake Baseurl "" +##sudo $PATH_TO_MISP/app/Console/cake Baseurl "" +sudo -u www-data /var/www/MISP/app/Console/cake Baseurl http:// sudo $PATH_TO_MISP/app/Console/cake Live $MISP_LIVE