#!/bin/bash set -x setup() { if ! systemctl is-active --quiet lxc-net; then apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make git libvirt0 libpam-cgfs bridge-utils uidmap dnsmasq-base dnsmasq dnsmasq-utils qemu-user-static systemctl disable --now dnsmasq apt-get install -y -qq lxc systemctl stop lxc-net cat >> /etc/default/lxc-net <<'EOF' LXC_ADDR="10.0.7.1" LXC_NETMASK="255.255.255.0" LXC_NETWORK="10.0.7.0/24" LXC_DHCP_RANGE="10.0.7.2,10.0.7.254" LXC_DHCP_MAX="253" EOF systemctl start lxc-net fi } setup