Skip to content

Commit 3b18ce4

Browse files
authored
Add extra check when users call hst-install-ubuntu / hst-install-debian (hestiacp#4487)
1 parent 82f42ce commit 3b18ce4

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

install/hst-install-debian.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,13 @@ if [ -d "/usr/local/hestia" ]; then
426426
check_result 1 "Hestia install detected. Unable to continue"
427427
fi
428428

429+
type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
430+
if [ "$type" = "ubuntu" ]; then
431+
check_result 1 "You are running the wrong installer for Ubuntu. Please run hst-install.sh or hst-install-ubuntu.sh instead."
432+
elif [ "$type" != "debian" ]; then
433+
check_result 1 "You are running an unsupported OS."
434+
fi
435+
429436
# Clear the screen once launch permissions have been verified
430437
clear
431438

install/hst-install-ubuntu.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ if [ -d "/usr/local/hestia" ]; then
422422
check_result 1 "Hestia install detected. Unable to continue"
423423
fi
424424

425+
type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
426+
if [ "$type" = "debian" ]; then
427+
check_result 1 "You are running the wrong installer for Debian. Please run hst-install.sh or hst-install-debian.sh instead."
428+
elif [ "$type" != "ubuntu" ]; then
429+
check_result 1 "You are running an unsupported OS."
430+
fi
431+
425432
# Clear the screen once launch permissions have been verified
426433
clear
427434

0 commit comments

Comments
 (0)