From e16c698fb1e231daca05280ec3b5fcdb126dec45 Mon Sep 17 00:00:00 2001 From: Michael Howe Date: Sat, 26 Jul 2014 17:12:44 +0100 Subject: [PATCH] Initial repo creation Start with a test bootstrap script --- bootstrap-host.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bootstrap-host.sh diff --git a/bootstrap-host.sh b/bootstrap-host.sh new file mode 100644 index 0000000..9ef8699 --- /dev/null +++ b/bootstrap-host.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +BASE_URL="https://svn.michaelhowe.org/static" +CERT_URL="$BASE_URL/MichaelSecurePlaces.pem" +GPG_PACKAGE_URL="$BASE_URL/mh-archive-keyring-latest.deb" + +TEMP_DIR=`mktemp -d` + +# Get the SSL certificate +TEMP_CERT="$TEMP_DIR/MichaelSecurePlaces.pem.crt" +wget -O $TEMP_CERT https://svn.michaelhowe.org/static/MichaelSecurePlaces.pem + +mkdir -p /usr/local/share/ca-certificates + +mv $TEMP_CERT /usr/local/share/ca-certificates/MichaelSecurePlaces.pem.crt + +update-ca-certificates + +# GPG key +TEMP_GPG_PACKAGE="$TEMP_DIR/mh-archive-keyring" +wget -O $TEMP_GPG_PACKAGE $GPG_PACKAGE_URL +dpkg -i $TEMP_GPG_PACKAGE -- 2.39.5