From: xf0r3m Date: Fri, 14 Jul 2023 17:08:09 +0000 (+0200) Subject: Dodanie dwóch nowych funkcji do idle.sh: idle-install-lxd, idle-lxd-init X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=b4769be1574991dfcb67caeab03b75ba92359b46;p=idle.git Dodanie dwóch nowych funkcji do idle.sh: idle-install-lxd, idle-lxd-init --- 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 +#}