From b4769be1574991dfcb67caeab03b75ba92359b46 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Fri, 14 Jul 2023 19:08:09 +0200 Subject: [PATCH] =?utf8?q?Dodanie=20dw=C3=B3ch=20nowych=20funkcji=20do=20i?= =?utf8?q?dle.sh:=20idle-install-lxd,=20idle-lxd-init?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idle.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/idle.sh b/idle.sh index df6e3ab..f8d09e3 100644 --- a/idle.sh +++ b/idle.sh @@ -21,3 +21,22 @@ function idle-size() { echo "Aprox. containers size: ${csize_total}${size_suffix}"; } +function idle-install-lxd() { + sudo apt-get install -y snap snapd bridge-utils iptables; + sudo snap install lxd; + + sudo ln -s /snap/bin/lxd /usr/bin/lxd; + sudo ln -s /snap/bin/lxc /usr/bin/lxc; + + sudo usermod -aG lxd $USER; + echo "Now you need to re-login to your user account"; +} + +function idle-lxd-init() { + cat $HOME/idle/idle_preseed.yaml | sudo lxd init --preseed; +} + +#function idle-list-containers() { +# for container in $(cut -d ";" -f 3 $DATABASE | awk '{printf $1" "}'); do +# done +#} -- 2.39.5