This commit is contained in:
Milan Meduna 2019-08-09 10:53:40 +02:00
parent 55713536c5
commit 2ac8f5fd55

View file

@ -50,14 +50,14 @@ zfs create crypt/lxd/storage
echo "Install snapd and lxd" echo "Install snapd and lxd"
pacman -S snapd --noconfirm pacman -S snapd --noconfirm
systemctl enable snapd
systemctl start snapd systemctl start snapd
sleep 5 sleep 5
snap install lxd snap install lxd
echo "Stopping and disabling lxd" echo "Stopping and disabling lxd"
systemctl disable snap.lxd.daemon snap stop --disable lxd
systemctl disable snap.lxd.daemon.unix.socket snap disable lxd
systemctl stop snap.lxd.daemon
echo "Deleting everything in /var/snap/lxd/common/lxd/*" echo "Deleting everything in /var/snap/lxd/common/lxd/*"
rm /var/snap/lxd/common/lxd/* -r rm /var/snap/lxd/common/lxd/* -r
@ -97,15 +97,14 @@ echo "echo \"Passwords not match!\"" >> /root/onstart
echo "exit 1" >> /root/onstart echo "exit 1" >> /root/onstart
echo "fi" >> /root/onstart echo "fi" >> /root/onstart
echo "echo \"Stopping LXD snap daemon and deleting /var/snap/lxd/common/lxd/*\"" >> /root/onstart echo "echo \"Stopping LXD snap daemon and deleting /var/snap/lxd/common/lxd/*\"" >> /root/onstart
echo "systemctl stop snap.lxd.daemon" >> /root/onstart echo "snap disable lxd" >> /root/onstart
echo "rm /var/snap/lxd/common/lxd/* -rf" >> /root/onstart echo "rm /var/snap/lxd/common/lxd/* -rf" >> /root/onstart
echo "echo \"Opening encrypted partition\"" >> /root/onstart echo "echo \"Opening encrypted partition\"" >> /root/onstart
echo "echo \$pass_var | cryptsetup open $PARTITION crypt -c -" >> /root/onstart echo "echo \$pass_var | cryptsetup open $PARTITION crypt -c -" >> /root/onstart
echo "partprobe" >> /root/onstart echo "partprobe" >> /root/onstart
echo "zpool import -d /dev/mapper crypt -f -m" >> /root/onstart echo "zpool import -d /dev/mapper crypt -f -m" >> /root/onstart
echo "systemctl start snapd" >> /root/onstart
echo "sleep 5" >> /root/onstart echo "sleep 5" >> /root/onstart
echo "systemctl start snap.lxd.daemon" >> /root/onstart echo "snap enable lxd" >> /root/onstart
chmod +x /root/onstart chmod +x /root/onstart
read -p "Press any key for reboot" read -p "Press any key for reboot"