Skip to content

Commit 736884e

Browse files
committed
Make both installers arm proof. Please not packages for HestiaCP ARM are not working yet
1 parent 0170959 commit 736884e

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

install/hst-install-debian.sh

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ HESTIA='/usr/local/hestia'
1414
LOG="/root/hst_install_backups/hst_install-$(date +%d%m%Y%H%M).log"
1515
memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
1616
hst_backups="/root/hst_install_backups/$(date +%d%m%Y%H%M)"
17-
arch=$(uname -i)
1817
spinner="/-\|"
1918
os='debian'
19+
architecture="$(uname -m)"
2020
release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
2121
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
2222
HESTIA_INSTALL_DIR="$HESTIA/install/deb"
@@ -396,6 +396,25 @@ if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
396396
fi
397397
fi
398398

399+
case $architecture in
400+
x86_64)
401+
ARCH="amd64"
402+
;;
403+
aarch64)
404+
ARCH="arm64"
405+
;;
406+
*)
407+
echo
408+
echo -e "\e[91mInstallation aborted\e[0m"
409+
echo "===================================================================="
410+
echo -e "\e[33mERROR: $architecture is currently not supported!\e[0m"
411+
echo -e "\e[33mPlease verify the achitecture used is currenlty supported\e[0m"
412+
echo ""
413+
echo -e "\e[33mhttps://github.com/hestiacp/hestiacp/blob/main/README.md\e[0m"
414+
echo ""
415+
check_result 1 "Installation aborted"
416+
esac
417+
399418
#----------------------------------------------------------#
400419
# Brief Info #
401420
#----------------------------------------------------------#
@@ -587,7 +606,7 @@ echo
587606
# Installing Nginx repo
588607
if [ "$nginx" = 'yes' ]; then
589608
echo "[ * ] NGINX"
590-
echo "deb [arch=amd64] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
609+
echo "deb [arch=$ARCH] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
591610
apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
592611
fi
593612

@@ -606,7 +625,7 @@ fi
606625
# Installing MariaDB repo
607626
if [ "$mysql" = 'yes' ]; then
608627
echo "[ * ] MariaDB"
609-
echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
628+
echo "deb [arch=$ARCH] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
610629
apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
611630
fi
612631

@@ -618,7 +637,7 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev
618637
# Installing PostgreSQL repo
619638
if [ "$postgresql" = 'yes' ]; then
620639
echo "[ * ] PostgreSQL"
621-
echo "deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
640+
echo "deb [arch=$ARCH] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
622641
apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
623642
fi
624643

install/hst-install-ubuntu.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ HESTIA='/usr/local/hestia'
1414
LOG="/root/hst_install_backups/hst_install-$(date +%d%m%Y%H%M).log"
1515
memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
1616
hst_backups="/root/hst_install_backups/$(date +%d%m%Y%H%M)"
17-
arch=$(uname -i)
1817
spinner="/-\|"
1918
os='ubuntu'
2019
release="$(lsb_release -s -r)"

0 commit comments

Comments
 (0)