Skip to content

Commit f7af5d3

Browse files
committed
Modify hst-install-ubuntu to support ARM
1 parent a506e21 commit f7af5d3

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

install/hst-install-ubuntu.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spinner="/-\|"
1919
os='ubuntu'
2020
release="$(lsb_release -s -r)"
2121
codename="$(lsb_release -s -c)"
22+
architecture="$(uname -m)"
2223
HESTIA_INSTALL_DIR="$HESTIA/install/deb"
2324
VERBOSE='no'
2425

@@ -370,6 +371,24 @@ if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
370371
fi
371372
fi
372373

374+
case $architecture in
375+
x86_64)
376+
ARCH="amd64"
377+
;;
378+
aarch64)
379+
ARCH="arm64"
380+
;;
381+
*);
382+
echo
383+
echo -e "\e[91mInstallation aborted\e[0m"
384+
echo "===================================================================="
385+
echo -e "\e[33mERROR: $architecture is currently not supported!\e[0m"
386+
echo -e "\e[33mPlease verify the achitecture used is currenlty supported\e[0m"
387+
echo ""
388+
echo -e "\e[33mhttps://github.com/hestiacp/hestiacp/blob/main/README.md\e[0m"
389+
echo ""
390+
check_result 1 "Installation aborted"
391+
esac
373392
#----------------------------------------------------------#
374393
# Brief Info #
375394
#----------------------------------------------------------#
@@ -561,7 +580,7 @@ echo
561580
# Installing Nginx repo
562581
if [ "$nginx" = 'yes' ]; then
563582
echo "[ * ] NGINX"
564-
echo "deb [arch=amd64] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
583+
echo "deb [arch=$ARCH] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
565584
apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
566585
fi
567586

@@ -578,7 +597,7 @@ fi
578597
# Installing MariaDB repo
579598
if [ "$mysql" = 'yes' ]; then
580599
echo "[ * ] MariaDB"
581-
echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
600+
echo "deb [arch=$ARCH] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
582601
apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
583602
fi
584603

@@ -590,7 +609,7 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev
590609
# Installing PostgreSQL repo
591610
if [ "$postgresql" = 'yes' ]; then
592611
echo "[ * ] PostgreSQL"
593-
echo "deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
612+
echo "deb [arch=$ARCH] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
594613
apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
595614
fi
596615

0 commit comments

Comments
 (0)