#!/bin/bash # Target DMZ set -e if [ -z $MILXCGUARD ] ; then exit 1; fi DIR=`dirname $0` cd `dirname $0` # disable systemd-resolved which conflicts with nsd echo "DNSStubListener=no" >> /etc/systemd/resolved.conf systemctl stop systemd-resolved apt-get update DEB_VERSION=`cat /etc/debian_version | cut -d'.' -f1` if [ $DEB_VERSION -eq "11" ] # DEB 11 aka Bullseye then DEBIAN_FRONTEND=noninteractive apt-get install -y certbot python3-certbot-apache else echo "Unsupported Debian version" exit 1 fi # preconfig TLS and certbot a2enmod ssl a2ensite default-ssl.conf echo -e " email=admin@kaz.milxc agree-tos=1 no-verify-ssl=1 " >> /etc/letsencrypt/cli.ini # Go KAZ ! # KAZ specific things #installation de docker, docker-compose et on y fourre le user debian dans le groupe idoine DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io docker-compose docker-clean git apg curl sudo unzip rsync fuse-overlayfs usermod -G docker debian # activation dans alias dans /root/.bashrc sed -i \ -e 's/^\# alias/alias/g' \ -e 's/^\# export/export/g' \ -e 's/^\# eval/eval/g' \ /root/.bashrc if ! grep -q "for file in /dockers" /root/.bashrc 2>/dev/null; then cat >> /root/.bashrc <> /root/.bashrc # On active fuse-overlayfs pour docker cat >> /etc/docker/daemon.json <