@@ -40,6 +40,8 @@ multiphp_required=("7.3" "7.4" "8.0" "8.1" "8.2","8.3")
4040fpm_v=" 8.3"
4141# MariaDB version
4242mariadb_v=" 11.4"
43+ # Node.js version
44+ node_v=" 20"
4345
4446# Defining software pack for all distros
4547software=" acl apache2 apache2-suexec-custom apache2-suexec-pristine apache2-utils awstats bc bind9 bsdmainutils bsdutils
@@ -690,7 +692,7 @@ if [ "$interactive" = 'yes' ]; then
690692 fi
691693fi
692694
693- # Validate Username / Password / Email / Hostname even when interactive = no
695+ # Validate Username / Password / Email / Hostname even when interactive = no
694696if [ -z " $username " ]; then
695697 while validate_username; do
696698 read -p ' Please enter administrator username: ' username
701703 fi
702704fi
703705
704- # Ask for the password
706+ # Ask for password
705707if [ -z " $vpass " ]; then
706708 while validate_password; do
707709 read -p ' Please enter administrator password: ' vpass
791793# Checking swap #
792794# ----------------------------------------------------------#
793795
794- # Checking swap on small instances
796+ # Add swap for low memory servers
795797if [ -z " $( swapon -s) " ] && [ " $memory " -lt 1000000 ]; then
796798 fallocate -l 1G /swapfile
797799 chmod 600 /swapfile
807809# Define apt conf location
808810apt= /etc/apt/sources.list.d
809811
810- # Create new folder if not all-ready exists
812+ # Create new folder if it doesn't exist
811813mkdir -p /root/.gnupg/ && chmod 700 /root/.gnupg/
812814
813815# Updating system
814816echo " Adding required repositories to proceed with installation:"
815817echo
816818
817819# Installing Nginx repo
818-
819820echo " [ * ] NGINX"
820821echo " deb [arch=$ARCH signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://nginx.org/packages/mainline/$VERSION / $codename nginx" > $apt /nginx.list
821822curl -s https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-keyring.gpg > /dev/null 2>&1
834835
835836# Installing MariaDB repo
836837if [ " $mysql " = ' yes' ]; then
838+ echo " [ * ] MariaDB $mariadb_v "
837839 if [ " $release " != ' 12' ]; then
838- echo " [ * ] MariaDB"
839840 echo " deb [arch=$ARCH signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/$mariadb_v /repo/$VERSION $codename main" > $apt /mariadb.list
840841 curl -s https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | tee /usr/share/keyrings/mariadb-keyring.gpg > /dev/null 2>&1
841842 else
842- echo " [ * ] MariaDB"
843843 echo " #deb [arch=$ARCH signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/$mariadb_v /repo/$VERSION $codename main" > $apt /mariadb.list
844844 curl -s https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | tee /usr/share/keyrings/mariadb-keyring.gpg > /dev/null 2>&1
845845 fi
@@ -866,12 +866,12 @@ echo "[ * ] Hestia Control Panel"
866866echo " deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST / $codename main" > $apt /hestia.list
867867gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
868868
869- # Detect if nodejs is allready installed if not add the repo
870- echo " [ * ] Node.js 20.x "
871- if [ -z $( which " node " ) ] ; then
872- curl -fsSL https://deb.nodesource.com/setup_20 .x | bash -
873- else
874- echo " - Node.js is already installed "
869+ # Installing Node.js repo
870+ if [ " $webterminal " = ' yes ' ] ; then
871+ echo " [ * ] Node.js $node_v "
872+ echo " deb [arch= $ARCH signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_ $node_v .x nodistro main " > $apt /nodejs.list
873+ curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodejs.gpg > /dev/null 2>&1
874+ curl -fsSL https://deb.nodesource.com/setup_ $node_v .x | bash -
875875fi
876876
877877# Installing PostgreSQL repo
@@ -1220,7 +1220,7 @@ if [ ! -f "/etc/default/ntpsec-ntpdate " ]; then
12201220 systemctl start systemd-timesyncd
12211221fi
12221222# Restrict access to /proc fs
1223- # - Prevent unpriv users from seeing each other running processes
1223+ # Prevent unpriv users from seeing each other running processes
12241224mount -o remount,defaults,hidepid= 2 /proc > /dev/null 2>&1
12251225if [ $? -ne 0 ]; then
12261226 echo " Info: Cannot remount /proc (LXC containers require additional perm added to host apparmor profile)"
@@ -1278,7 +1278,7 @@ touch $HESTIA/conf/hestia.conf
12781278chmod 660 $HESTIA /conf/hestia.conf
12791279
12801280# Write default port value to hestia.conf
1281- # If a custom port is specified it will be set at the end of the installation process.
1281+ # If a custom port is specified it will be set at the end of the installation process
12821282write_config_value " BACKEND_PORT" " 8083"
12831283
12841284# Web stack
@@ -1389,7 +1389,7 @@ write_config_value "BACKUP_MODE" "zstd"
13891389# Language
13901390write_config_value " LANGUAGE" " $lang "
13911391
1392- # Login in screen
1392+ # Login screen style
13931393write_config_value " LOGIN_STYLE" " default"
13941394
13951395# Theme
@@ -1454,7 +1454,7 @@ if [ "$named" = "no" ]; then
14541454 sed -i " /COMMENT='DNS'/d" $HESTIA /data/firewall/rules.conf
14551455fi
14561456
1457- # Installing apis
1457+ # Installing API
14581458cp -r f $HESTIA_COMMON_DIR /api $HESTIA /data/
14591459
14601460# Configuring server hostname
@@ -1502,12 +1502,12 @@ rm /tmp/hst.pem
15021502# Install dhparam.pem
15031503cp -f $HESTIA_INSTALL_DIR /ssl/dhparam.pem /etc/ssl
15041504
1505- # Enable sftp jail
1505+ # Enable SFTP jail
15061506echo " [ * ] Enabling SFTP jail..."
15071507$HESTIA /bin/v-add-sys-sftp-jail > /dev/null 2>&1
15081508check_result $? " can't enable sftp jail"
15091509
1510- # Enable ssh jail
1510+ # Enable SSH jail
15111511echo " [ * ] Enabling SSH jail..."
15121512$HESTIA /bin/v-add-sys-ssh-jail > /dev/null 2>&1
15131513check_result $? " can't enable ssh jail"
@@ -1868,7 +1868,7 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
18681868 # shellcheck source=/usr/local/hestia/install/deb/phpmyadmin/pma.sh
18691869 source $HESTIA_INSTALL_DIR /phpmyadmin/pma.sh > /dev/null 2>&1
18701870
1871- # limit access to /etc/phpmyadmin/
1871+ # Limit access to /etc/phpmyadmin/
18721872 chown -R root:www-data /etc/phpmyadmin/
18731873 chmod -R 640 /etc/phpmyadmin/*
18741874 chmod 750 /etc/phpmyadmin/conf.d/
@@ -2006,7 +2006,7 @@ if [ "$dovecot" = 'yes' ]; then
20062006 touch /var/log/dovecot.log
20072007 chown -R dovecot:mail /var/log/dovecot.log
20082008 chmod 660 /var/log/dovecot.log
2009- # Alter config for 2.2
2009+ # Alter config for 2.2
20102010 version=$( dovecot --version | cut -f -2 -d .)
20112011 if [ " $version " = " 2.2" ]; then
20122012 echo " [ * ] Downgrade dovecot config to sync with 2.2 settings"
@@ -2200,7 +2200,7 @@ if [ "$sieve" = 'yes' ]; then
22002200 chmod 640 $RC_CONFIG_DIR /config.inc.php
22012201 fi
22022202
2203- # Restart Dovecot and exim4
2203+ # Restart Dovecot and Exim4
22042204 systemctl restart dovecot > /dev/null 2>&1
22052205 systemctl restart exim4 > /dev/null 2>&1
22062206fi
0 commit comments