Skip to content

Commit ae82394

Browse files
Skamaslejaapmarcus
andauthored
Update hst-install-ubuntu.sh (hestiacp#4528)
* Update hst-install-ubuntu.sh Error in ubuntu 24.04 * Format changes --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent ff3ad71 commit ae82394

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

install/hst-install-ubuntu.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,13 @@ fi
10821082
#----------------------------------------------------------#
10831083

10841084
# Enable en_US.UTF-8
1085-
sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen
1086-
locale-gen > /dev/null 2>&1
1085+
if [ -f /etc/locale.gen ]; then
1086+
sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen
1087+
locale-gen > /dev/null 2>&1
1088+
elif [ -f /usr/bin/localectl ]; then
1089+
apt-get -y install locales-all >> $LOG
1090+
localectl set-locale LANG=en_US.UTF-8 > /dev/null 2>&1
1091+
fi
10871092

10881093
# Disabling daemon autostart on apt-get install
10891094
echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d

0 commit comments

Comments
 (0)