Skip to content

Commit 4f12830

Browse files
authored
Update LXD build script (hestiacp#3347)
* Add missing new OS remove the old * Update versions and use /deb/ instead of /debs/ * Use snapd instead
1 parent 71ca950 commit 4f12830

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/lxd_build_all.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
#
1414

1515
# Configs:
16-
oslist=('debian=9,10' 'ubuntu=18.04,20.04')
16+
# Use focal and jammy instead of "20.04 an 22.04"
17+
oslist=('debian=10,11' 'ubuntu=18.04,focal,jammy')
1718
branch='main'
1819

1920
function setup_container() {
@@ -42,8 +43,10 @@ if [ -z "$user" ] || [ -z "$user_id" ] || [ -z "$user_gid" ] || [ "$user" = 'roo
4243
echo "Script must be run with sudo, not directly as root" && exit 1
4344
fi
4445

45-
if ! dpkg-query -s lxd > /dev/null 2>&1; then
46-
apt -y install lxd
46+
if ! which lxd > /dev/null 2>&1; then
47+
# Use snapd instead
48+
apt -y install snapd
49+
snap install lxd
4750
lxd init --auto
4851

4952
echo "root:$user_id:1" | sudo tee -a /etc/subuid

src/lxd_compile.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ branch=${1-main}
44

55
apt -y install curl wget
66

7-
curl https://raw.githubusercontent.com/hestiacp/hestiacp/main/src/hst_autocompile.sh > /tmp/hst_autocompile.sh
7+
curl https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/hst_autocompile.sh > /tmp/hst_autocompile.sh
88
chmod +x /tmp/hst_autocompile.sh
99

1010
mkdir -p /opt/hestiacp
1111

1212
# Building Hestia
1313
if bash /tmp/hst_autocompile.sh --hestia --noinstall --keepbuild $branch; then
14-
cp /tmp/hestiacp-src/debs/*.deb /opt/hestiacp/
14+
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
1515
fi
1616

1717
# Building PHP
1818
if bash /tmp/hst_autocompile.sh --php --noinstall --keepbuild $branch; then
19-
cp /tmp/hestiacp-src/debs/*.deb /opt/hestiacp/
19+
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
2020
fi
2121

2222
# Building NGINX
2323
if bash /tmp/hst_autocompile.sh --nginx --noinstall --keepbuild $branch; then
24-
cp /tmp/hestiacp-src/debs/*.deb /opt/hestiacp/
24+
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
2525
fi

0 commit comments

Comments
 (0)