42 lines
No EOL
1.2 KiB
Bash
Executable file
42 lines
No EOL
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
|
|
sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-lts-6.0.sources
|
|
Enabled: yes
|
|
Types: deb
|
|
URIs: https://pkgs.zabbly.com/incus/lts-6.0
|
|
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
|
|
Components: main
|
|
Architectures: $(dpkg --print-architecture)
|
|
Signed-By: /etc/apt/keyrings/zabbly.asc
|
|
|
|
EOF'
|
|
|
|
apt update
|
|
apt install incus -y
|
|
|
|
incus ls
|
|
|
|
lxd-to-incus --ignore-version-check --yes
|
|
|
|
incus admin shutdown
|
|
|
|
systemctl stop incus
|
|
systemctl stop incus.socket
|
|
systemctl stop incus-user.socket
|
|
|
|
zfs set mountpoint=/var/lib/incus crypt/lxd/dir
|
|
|
|
systemctl start incus.socket
|
|
systemctl start incus-user.socket
|
|
systemctl start incus
|
|
|
|
|
|
cp /root/onstart /root/onstart-backup
|
|
|
|
rpl 'LXD snap daemon' 'Incus daemons' /root/onstart
|
|
rpl '/var/snap/lxd/common/lxd/' '/var/lib/incus/' /root/onstart
|
|
|
|
sed -i 's/snap disable lxd/systemctl stop incus\nsystemctl stop incus.socket\nsystemctl stop incus-user.socket/' /root/onstart
|
|
sed -i 's/snap enable lxd/systemctl start incus-user.socket\nsystemctl start incus.socket\nsystemctl start incus/' /root/onstart
|
|
|
|
mv /etc/sysctl.d/50-usl-mm.conf /etc/sysctl.d/50-usi-mm.conf |