From 7bb4ff5671e9f52e73c047d3488524c2f9a42fe0 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 17 May 2023 01:02:22 +0200 Subject: [PATCH] DRY: re-use lxc-helpers --- forgejo-dependencies.sh | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/forgejo-dependencies.sh b/forgejo-dependencies.sh index 42ee283..ace9635 100755 --- a/forgejo-dependencies.sh +++ b/forgejo-dependencies.sh @@ -3,35 +3,18 @@ set -x +source $(dirname $0)/lxc-helpers/enough-lxc-helpers.sh + : ${LXC_IP_PREFIX:=10.0.8} function install_docker() { if ! systemctl is-active --quiet docker; then - echo deb http://deb.debian.org/debian bullseye-backports main | tee /etc/apt/sources.list.d/backports.list && apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --quiet -y -t bullseye-backports git docker.io - fi -} - -function install_lxc() { - 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 <