#!/bin/bash -x GITPROJ=https://chaos.expert/ccc-ffm/4Refugees-InternetCafe if [ "$1" != "RUNME" ]; then #pull myself from git repo wget "${GITPROJ}/raw/master/bootstrap.sh" -O /root/bootstrap.sh chmod u+x /root/bootstrap.sh exec /root/bootstrap.sh RUNME exit fi #check for install.hqs if ping -c 5 instal.hq; then echo 'Acquire::http::Proxy "http://install.hq:8080/";' > /etc/apt/apt.conf else echo "#no proxy" > /etc/apt/apt.conf fi apt update apt install git puppet vim apt full-upgrade if [ ! -e /etc/puppet/.git ]; then mv /etc/puppet /etc/puppet.orig git clone ${GITPROJ}.git /etc/puppet fi cd /etc/puppet git pull git submodule init git submodule update git pull puppet apply /etc/puppet/manifests/site.pp