Skip to content

Commit 230f02c

Browse files
Chore/various improvements (hestiacp#4473)
* Bugfix: Node.js installation overwriting log * Sync PHP packages for MultiPHP with default * Use version variable for Node.js * Remove quota package when service removed * Remove quota package when service removed * Improve checking whether Apache config exists * Fix typos
1 parent d08b447 commit 230f02c

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

bin/v-add-sys-web-terminal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if [ -z $(which "node") ]; then
5454
else
5555
node_v_installed=$(/usr/bin/node -v | cut -f1 -d'.' | sed 's/v//g')
5656
if [ "$node_v_installed" -lt "$node_v" ]; then
57-
echo "Web Terminal requires Node.js 20.x or higher"
57+
echo "Web Terminal requires Node.js $node_v or latest"
5858
exit 1
5959
fi
6060
fi

bin/v-add-web-php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ check_hestia_demo_mode
6363
mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli php$version-curl
6464
php$version-fpm php$version-gd php$version-intl php$version-mysql
6565
php$version-soap php$version-xml php$version-zip php$version-json php$version-bz2
66-
php$version-pspell php$version-imagick php$version-pgsql php$version-imap php$version-ldap"
66+
php$version-pspell php$version-imagick php$version-pgsql php$version-imap php$version-ldap php$version-apcu"
6767

68-
# Check is version is 7.1 or below to add mcrypt
68+
# Check if version is 7.1 or below to add mcrypt
6969
if [[ $(echo "$version 7.2" | awk '{print ($1 < $2)}') == 1 ]]; then
7070
mph="$mph php$version-mcrypt"
7171
fi
7272

73-
# Check if version is 8.0 or higher and drop php json.
73+
# Check if version is 8.0 or higher and drop json
7474
if [[ ${version:0:1} == "8" ]]; then
7575
mph=$(echo "$mph" | sed -e "s/php$version-json//")
7676
fi

bin/v-change-sys-webmail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ for user in $("$BIN/v-list-users" list); do
5151
done
5252
done
5353

54-
if [ -d /etc/apache2/ ]; then
54+
if [ -s /etc/apache2/apache2.conf ]; then
5555
sed -i "s/IncludeOptional conf.d\/domains\/$WEBMAIL_ALIAS.*.conf/IncludeOptional conf.d\/domains\/$NEW_ALIAS.*.conf/g" /etc/apache2/apache2.conf
5656
fi
5757

bin/v-delete-sys-quota

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ fi
6464
# Updating hestia.conf value
6565
$BIN/v-change-sys-config-value "DISK_QUOTA" "no"
6666

67+
# Remove quota package
68+
apt-get -y purge quota > /dev/null 2>&1
69+
6770
#----------------------------------------------------------#
6871
# Hestia #
6972
#----------------------------------------------------------#

bin/v-delete-web-php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli
6262
php$version-fpm php$version-gd php$version-intl php$version-mysql
6363
php$version-soap php$version-xml php$version-zip php$version-mbstring
6464
php$version-json php$version-bz2 php$version-pspell php$version-imagick php$version-pgsql
65-
php$version-imap php$version-ldap"
65+
php$version-imap php$version-ldap php$version-apcu"
6666

67-
# Check is version is 7.1 or below to add mcrypt
67+
# Check if version is 7.1 or below to remove mcrypt
6868
if [[ $(echo "$version 7.2" | awk '{print ($1 < $2)}') == 1 ]]; then
6969
mph="$mph php$version-mcrypt"
7070
fi
@@ -89,7 +89,7 @@ done
8989
# Do a blank echo to get the \n back
9090
echo
9191

92-
# Check if installation was successfully
92+
# Check if removal was successful
9393
if [ -f "$php_fpm" ]; then
9494
echo "ERROR: Uninstallation failed, please run the following command manually for debugging:"
9595
if [ -f '/etc/redhat-release' ]; then

install/hst-install-debian.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ if [ "$webterminal" = 'yes' ]; then
871871
echo "[ * ] Node.js $node_v"
872872
echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_$node_v.x nodistro main" > $apt/nodejs.list
873873
curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodejs.gpg > /dev/null 2>&1
874-
apt-get -y install nodejs > $LOG
874+
apt-get -y install nodejs >> $LOG
875875
fi
876876

877877
# Installing PostgreSQL repo
@@ -1196,7 +1196,7 @@ systemctl restart ssh
11961196

11971197
# Disable AWStats cron
11981198
rm -f /etc/cron.d/awstats
1199-
# Replace awstatst function
1199+
# Replace AWStats function
12001200
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
12011201

12021202
# Set directory color

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ if [ "$webterminal" = 'yes' ]; then
841841
echo "[ * ] Node.js $node_v"
842842
echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_$node_v.x nodistro main" > $apt/nodejs.list
843843
curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodejs.gpg > /dev/null 2>&1
844-
apt-get -y install nodejs > $LOG
844+
apt-get -y install nodejs >> $LOG
845845
fi
846846

847847
# Installing PostgreSQL repo
@@ -1183,7 +1183,7 @@ systemctl restart ssh
11831183

11841184
# Disable AWStats cron
11851185
rm -f /etc/cron.d/awstats
1186-
# Replace awstatst function
1186+
# Replace AWStats function
11871187
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
11881188

11891189
# Set directory color

0 commit comments

Comments
 (0)