فهرست منبع

Merge branch 'staging/features' into staging/v1.2.0-release

Kristan Kenney 5 سال پیش
والد
کامیت
b3f7597523

+ 26 - 10
bin/v-add-cron-hestia-autoupdate

@@ -1,8 +1,8 @@
 #!/bin/bash
 #!/bin/bash
 # info: add cron job for hestia autoupdates
 # info: add cron job for hestia autoupdates
-# options: NONE
+# options: MODE
 #
 #
-# The function adds cronjob for hestia autoupdate.
+# The function adds cronjob for hestia autoupdate from apt or git.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -11,6 +11,7 @@
 
 
 # Argument definition
 # Argument definition
 user=admin
 user=admin
+mode=$1
 
 
 # Includes
 # Includes
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
@@ -24,8 +25,9 @@ source $HESTIA/conf/hestia.conf
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_package_full 'CRON_JOBS'
 is_package_full 'CRON_JOBS'
 get_next_cronjob
 get_next_cronjob
-check_cron=$(grep 'v-update-sys-hestia-all' $USER_DATA/cron.conf)
-if [ ! -z "$check_cron" ]; then
+check_cron_apt=$(grep 'v-update-sys-hestia-all' $USER_DATA/cron.conf)
+check_cron_git=$(grep 'v-update-sys-hestia-git' $USER_DATA/cron.conf)
+if [ ! -z "$check_cron_apt" ] || [ ! -z "$check_cron_git" ]; then
     exit
     exit
 fi
 fi
 
 
@@ -42,13 +44,27 @@ time_n_date=$(date +'%T %F')
 time=$(echo "$time_n_date" |cut -f 1 -d \ )
 time=$(echo "$time_n_date" |cut -f 1 -d \ )
 date=$(echo "$time_n_date" |cut -f 2 -d \ )
 date=$(echo "$time_n_date" |cut -f 2 -d \ )
 
 
+# Remove existing cron job
+$BIN/v-delete-cron-hestia-autoupdate
+
 # Define time somewhere at night
 # Define time somewhere at night
-min=$(generate_password '012345' '2')
-hour=$(generate_password '1234567' '1')
-day='*'
-month='*'
-wday='*'
-command='sudo /usr/local/hestia/bin/v-update-sys-hestia-all'
+if [ -z "$mode" ] || [ "$mode" = "apt" ]; then
+    min=$(generate_password '012345' '2')
+    hour=$(generate_password '1234567' '1')
+    day='*'
+    month='*'
+    wday='*'
+    command='sudo /usr/local/hestia/bin/v-update-sys-hestia-all'
+fi
+
+if [ "$mode" = "git" ]; then
+    min='0'
+    hour='0'
+    day='*'
+    month='*'
+    wday='*'
+    command='sudo /usr/local/hestia/bin/v-update-sys-hestia-git'
+fi
 
 
 # Concatenating cron string
 # Concatenating cron string
 str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'"
 str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'"

+ 119 - 0
bin/v-add-sys-filemanager

@@ -0,0 +1,119 @@
+#!/bin/bash
+# info: add file manager functionality to Hestia Control Panel
+# options: none
+#
+# The function installs the File Manager on the server
+# for access through the Web interface.
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Includes
+source $HESTIA/func/main.sh
+source $HESTIA/conf/hestia.conf
+
+MODE=$1
+user="admin"
+
+FM_INSTALL_DIR="$HESTIA/web/fm"
+FM_V="7.4.1"
+FM_FILE="filegator_v${FM_V}.zip"
+FM_URL="https://github.com/filegator/filegator/releases/download/v${FM_V}/${FM_FILE}"
+COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
+
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+# Checking root permissions
+if [ "x$(id -u)" != 'x0' ]; then
+    echo "ERROR: v-add-sys-filemanager can be run executed only by root user"
+    exit 10
+fi
+
+# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
+if [ -z "$HESTIA" ]; then
+    HESTIA="/usr/local/hestia"
+fi
+
+if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
+    echo "ERROR: Environment variables not present, installation aborted."
+    exit 2
+fi
+
+# Ensure that Composer is installed for the user before continuing as it is a dependency of the File Manager.
+if [ ! -f "$COMPOSER_BIN" ]; then
+    $BIN/v-add-user-composer "$user"
+    if [ $? -ne 0 ]; then
+        $BIN/v-add-user-notification admin 'Composer installation failed!' '<b>The File Manager will not work without Composer.</b><br><br>Please try running the installer manually from a shell session:<br>v-add-sys-filemanager<br><br>If this continues, open an issue report on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
+        exit 1
+    fi
+fi
+
+# Ensure PHP 7.3 is installed before continuing
+if [ ! -f "/usr/bin/php7.3" ]; then
+    $BIN/v-add-user-notification admin 'File Manager installation failed!' '<b>Unable to proceed with installation of File Manager.</b><br><br>Package <b>php7.3-cli</b> is missing from your system. Please check your PHP installation and environment settings.'
+    echo "ERROR: PHP 7.3 not installed on your system, aborting."
+    exit 1
+fi
+
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+rm --recursive --force "$FM_INSTALL_DIR"
+mkdir -p "$FM_INSTALL_DIR"
+cd "$FM_INSTALL_DIR"
+
+[ ! -f "${FM_INSTALL_DIR}/${FM_FILE}" ] && wget "$FM_URL" --quiet -O "${FM_INSTALL_DIR}/${FM_FILE}"
+
+unzip -qq "${FM_INSTALL_DIR}/${FM_FILE}"
+mv --force ${FM_INSTALL_DIR}/filegator/* "${FM_INSTALL_DIR}"
+rm --recursive --force ${FM_INSTALL_DIR}/filegator
+[[ -f "${FM_INSTALL_DIR}/${FM_FILE}" ]] && rm "${FM_INSTALL_DIR}/${FM_FILE}"
+
+cp --recursive --force ${HESTIA_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTALL_DIR}"
+
+chown $user: -R "${FM_INSTALL_DIR}"
+
+COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php7.3 $COMPOSER_BIN --quiet --no-dev install
+
+# Check if installation was successful, if not abort script and throw error message notification and clean-up
+if [ $? -ne 0 ]; then
+    echo "ERROR: File Manager installation failed!"
+    echo "Please report this to our development team:"
+    echo "https://github.com/hestiacp/hestiacp/issues"
+    $BIN/v-add-user-notification admin 'File Manager installation failed!' 'Please report this to our development team on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
+    # Installation failed, clean up files
+    rm --recursive --force ${FM_INSTALL_DIR}
+    $BIN/v-change-sys-config-value 'FILE_MANAGER' 'false'
+    exit 1
+fi
+
+# Add configuration file
+cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
+
+
+# Set permissions
+chown root: -R "${FM_INSTALL_DIR}"
+chown $user: "${FM_INSTALL_DIR}/private"
+chown $user: "${FM_INSTALL_DIR}/private/logs"
+chown $user: "${FM_INSTALL_DIR}/repository"
+
+$BIN/v-change-sys-config-value 'FILE_MANAGER' 'true'
+
+if [ "$MODE" != "quiet" ]; then
+    echo "File Manager is now installed and ready for use."  
+fi
+
+#----------------------------------------------------------#
+#                       Logging                            #
+#----------------------------------------------------------#
+
+log_history "file manager installed" '' 'admin'
+log_event "$OK" "$ARGUMENTS"

+ 88 - 5
bin/v-change-domain-owner

@@ -32,6 +32,7 @@ if [ -z "$owner" ]; then
     check_result $E_NOTEXIST "domain $domain doesn't exist"
     check_result $E_NOTEXIST "domain $domain doesn't exist"
 fi
 fi
 if [ "$owner" = "$user" ]; then
 if [ "$owner" = "$user" ]; then
+    echo "ERROR: $domain is already owned by $user."
     exit
     exit
 fi
 fi
 
 
@@ -43,9 +44,12 @@ check_hestia_demo_mode
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+echo "Moving $domain from $owner to $user, please wait..."
+
 # WEB domain
 # WEB domain
 web_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/web.conf)
 web_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/web.conf)
 if [ ! -z "$web_data" ]; then
 if [ ! -z "$web_data" ]; then
+    echo "[*] Moving web domain..."
     $BIN/v-suspend-web-domain $owner $domain >> /dev/null 2>&1
     $BIN/v-suspend-web-domain $owner $domain >> /dev/null 2>&1
     parse_object_kv_list "$web_data"
     parse_object_kv_list "$web_data"
 
 
@@ -95,6 +99,7 @@ fi
 # DNS domain
 # DNS domain
 dns_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/dns.conf)
 dns_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/dns.conf)
 if [ ! -z "$dns_data" ]; then
 if [ ! -z "$dns_data" ]; then
+    echo "[*] Moving DNS zone and records..."
     parse_object_kv_list "$dns_data"
     parse_object_kv_list "$dns_data"
 
 
     # Change IP
     # Change IP
@@ -125,6 +130,14 @@ fi
 # MAIL domain
 # MAIL domain
 mail_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/mail.conf)
 mail_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/mail.conf)
 if [ ! -z "$mail_data" ]; then
 if [ ! -z "$mail_data" ]; then
+    echo "[*] Moving mail domain and accounts..."
+
+    parse_object_kv_list "$mail_data"
+
+    # Ensure mail configuration directory exists for receiving user
+    if [ ! -e "$HOMEDIR/$user/conf/mail/$domain/" ]; then
+        mkdir -p $HOMEDIR/$user/conf/mail/$domain/
+    fi
 
 
     # Move config
     # Move config
     sed -i "/DOMAIN='$domain'/d" $HESTIA/data/users/$owner/mail.conf
     sed -i "/DOMAIN='$domain'/d" $HESTIA/data/users/$owner/mail.conf
@@ -140,6 +153,56 @@ if [ ! -z "$mail_data" ]; then
             $HESTIA/data/users/$user/mail/
             $HESTIA/data/users/$user/mail/
     fi
     fi
 
 
+    # Move SSL certificates
+    if [ "$SSL" = 'yes' ]; then
+         # Ensure that SSL directory exists and move certificates
+        mkdir -p $HESTIA/data/users/$user/ssl/
+        mkdir -p $HOMEDIR/$user/conf/mail/$domain/ssl/
+        
+        ssl_crt=$HESTIA/data/users/$owner/ssl/mail.$domain.crt
+        ssl_key=$HESTIA/data/users/$owner/ssl/mail.$domain.key
+        ssl_ca=$HESTIA/data/users/$owner/ssl/mail.$domain.ca
+        ssl_pem=$HESTIA/data/users/$owner/ssl/mail.$domain.pem
+        mv $ssl_crt $HESTIA/data/users/$user/ssl/
+        mv $ssl_key $HESTIA/data/users/$user/ssl/
+        mv $ssl_ca $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1
+        mv $ssl_pem $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1     
+        
+        # Add certificate to user home directory
+        cp -f $HESTIA/data/users/$user/ssl/mail.$domain.crt $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.crt
+        cp -f $HESTIA/data/users/$user/ssl/mail.$domain.key $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key
+        cp -f $HESTIA/data/users/$user/ssl/mail.$domain.pem $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem
+        if [ -e "$HESTIA/data/users/$user/ssl/mail.$domain.ca" ]; then
+            cp -f $HESTIA/data/users/$user/ssl/mail.$domain.ca $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.ca
+        fi
+
+        # Add domain SSL configuration to dovecot
+        if [ -f /etc/dovecot/conf.d/domains/$domain.conf ]; then
+            rm -f /etc/dovecot/conf.d/domains/$domain.conf
+        fi
+        
+        echo "" >> /etc/dovecot/conf.d/domains/$domain.conf
+        echo "local_name mail.$domain {" >> /etc/dovecot/conf.d/domains/$domain.conf
+        echo "  ssl_cert = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem" >> /etc/dovecot/conf.d/domains/$domain.conf
+        echo "  ssl_key = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key" >> /etc/dovecot/conf.d/domains/$domain.conf
+        echo "}" >> /etc/dovecot/conf.d/domains/$domain.conf
+
+        # Add domain SSL configuration to exim4
+        # Cleanup symlinks
+        find /usr/local/hestia/ssl/mail -xtype l -delete
+
+        ln -s -f $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem /usr/local/hestia/ssl/mail/mail.$domain.crt
+        ln -s -f $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key /usr/local/hestia/ssl/mail/mail.$domain.key
+
+        # Set correct permissions on certificates
+        chmod 750 $HOMEDIR/$user/conf/mail/$domain/ssl
+        chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain/ssl
+        chmod 0644 $HOMEDIR/$user/conf/mail/$domain/ssl/*
+        chown -h $user:mail $HOMEDIR/$user/conf/mail/$domain/ssl/*
+        chmod -R 0644 /usr/local/hestia/ssl/mail/*
+        chown -h $user:mail /usr/local/hestia/ssl/mail/*
+    fi
+
     # Move data
     # Move data
     mv $HOMEDIR/$owner/mail/$domain $HOMEDIR/$user/mail/
     mv $HOMEDIR/$owner/mail/$domain $HOMEDIR/$user/mail/
 
 
@@ -147,11 +210,6 @@ if [ ! -z "$mail_data" ]; then
     find $HOMEDIR/$user/mail/$domain -user $owner \
     find $HOMEDIR/$user/mail/$domain -user $owner \
         -exec chown -h $user {} \;
         -exec chown -h $user {} \;
 
 
-    # Rebuild config
-    $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
-    $BIN/v-rebuild-mail-domains $owner no
-    $BIN/v-rebuild-mail-domains $user
-
     # Checking exim username for later chowning
     # Checking exim username for later chowning
     exim_user="exim";
     exim_user="exim";
     check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
     check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
@@ -163,18 +221,43 @@ if [ ! -z "$mail_data" ]; then
         find $HOMEDIR/$user/conf/mail/$domain -user root \
         find $HOMEDIR/$user/conf/mail/$domain -user root \
             -exec chown $exim_user {} \;
             -exec chown $exim_user {} \;
     fi
     fi
+
+    # Remove old mail directory from original owner
+    if [ -e "$HOMEDIR/$owner/mail/$domain" ]; then
+        rm -rf "$HOMEDIR/$owner/mail/$domain"
+    fi
+
+    # Remove old mail configuration directory from original owner
+    if [ -e "$HOMEDIR/$owner/conf/mail/$domain" ]; then
+        rm -rf "$HOMEDIR/$owner/conf/mail/$domain"
+    fi
+    if [ -e "$HESTIA/data/users/$owner/mail/$domain.conf" ]; then
+        rm -f "$HESTIA/data/users/$owner/mail/$domain.conf"
+    fi
+
+    # Rebuild config
+    $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
+    $BIN/v-rebuild-mail-domains $owner no
+    $BIN/v-rebuild-mail-domains $user
 fi
 fi
 
 
 # Update counters
 # Update counters
 $BIN/v-update-user-counters $owner
 $BIN/v-update-user-counters $owner
 $BIN/v-update-user-counters $user
 $BIN/v-update-user-counters $user
 
 
+# Send notification to panel
+if [ ! -z "$web_data" ] || [ ! -z "$dns_data" ] || [ ! -z "$mail_data" ]; then
+    $HESTIA/bin/v-add-user-notification "$user" "$domain has been added to your account" ''
+fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
+log_history "moved domain $domain from $owner to $user" '' "admin"
+log_history "$domain was added to your account" '' "$user"
+log_history "$domain was removed from your account" '' "$owner"
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 9 - 5
bin/v-change-sys-release

@@ -35,10 +35,14 @@ if [ -z "$branch" ]; then
     echo "Error: no release branch specified."
     echo "Error: no release branch specified."
     echo "Usage: v-change-sys-release branchname"
     echo "Usage: v-change-sys-release branchname"
     echo ""
     echo ""
-    echo "Common release branches:"
-    echo "(*) release:      The latest stable release available via APT"
-    echo "(*) prerelease:   Beta/release candidate releases"
-    echo "(*) master:       The latest development code from GitHub"
+    echo "Release branches:"
+    echo "- release:            the latest stable release"
+    echo "- beta:               beta and release candidate test releases"
+    echo "- develop:            unstable development builds"
+    echo ""
+    echo "Integration branches (not tied to a specific release/version):"
+    echo "- staging/fixes:      contains new fixes since the last release."
+    echo "- staging/features:   contains new features since the last release."
     echo ""
     echo ""
     echo "You can also specify another branch name from the"
     echo "You can also specify another branch name from the"
     echo "GitHub repository to install the code from that branch."
     echo "GitHub repository to install the code from that branch."
@@ -58,7 +62,7 @@ else
     
     
     # Set new branch variable
     # Set new branch variable
     echo "RELEASE_BRANCH='$branch'" >> $HESTIA/conf/hestia.conf
     echo "RELEASE_BRANCH='$branch'" >> $HESTIA/conf/hestia.conf
-    echo "Changed system release to update from branch: $branch"
+    echo "Updated system to update from Git using branch: $branch"
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 9 - 5
bin/v-delete-cron-hestia-autoupdate

@@ -22,10 +22,8 @@ source $HESTIA/conf/hestia.conf
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
-check_cron=$(grep 'v-update-sys-hestia-all' $USER_DATA/cron.conf)
-if [ -z "$check_cron" ]; then
-    exit
-fi
+check_cron_apt=$(grep 'v-update-sys-hestia-all' $USER_DATA/cron.conf)
+check_cron_git=$(grep 'v-update-sys-hestia-git' $USER_DATA/cron.conf)
 
 
 # Perform verification if read-only mode is enabled
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 check_hestia_demo_mode
@@ -37,7 +35,13 @@ check_hestia_demo_mode
 
 
 
 
 # Deleting job
 # Deleting job
-job=$(echo $check_cron|tr ' ' "\n"|grep JOB|cut -f 2 -d "'")
+if [ ! -z "$check_cron_apt" ]; then
+    job=$(echo $check_cron_apt|tr ' ' "\n"|grep JOB|cut -f 2 -d "'")
+fi
+if [ ! -z "$check_cron_git" ]; then
+    job=$(echo $check_cron_git|tr ' ' "\n"|grep JOB|cut -f 2 -d "'")
+fi
+
 sed -i "/JOB='$job' /d" $USER_DATA/cron.conf
 sed -i "/JOB='$job' /d" $USER_DATA/cron.conf
 
 
 # Sorting jobs by id
 # Sorting jobs by id

+ 0 - 1
bin/v-delete-mail-domain-ssl

@@ -33,7 +33,6 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'mail' 'DOMAIN' "$domain"
 is_object_valid 'mail' 'DOMAIN' "$domain"
 is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 is_object_value_exist 'mail' 'DOMAIN' "$domain" '$SSL'
 is_object_value_exist 'mail' 'DOMAIN' "$domain" '$SSL'
-is_object_value_exist 'mail' 'DOMAIN' "$domain" '$LETSENCRYPT'
 
 
 # Perform verification if read-only mode is enabled
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 check_hestia_demo_mode

+ 72 - 0
bin/v-delete-sys-filemanager

@@ -0,0 +1,72 @@
+#!/bin/bash
+# info: remove file manager functionality from Hestia Control Panel
+# options: [FULL]
+#
+# The function removes the File Manager and its entry points
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+MODE=$1
+
+# Includes
+source $HESTIA/func/main.sh
+source $HESTIA/conf/hestia.conf
+
+user='admin'
+FM_INSTALL_DIR="$HESTIA/web/fm"
+FM_V="7.4.1"
+COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+# Checking root permissions
+if [ "x$(id -u)" != 'x0' ]; then
+    echo "Error: Script can be run executed only by root"
+    exit 10
+fi
+
+# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
+if [ -z "$HESTIA" ]; then
+    HESTIA="/usr/local/hestia"
+fi
+
+if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
+    echo "Error: Hestia environment vars not present"
+    exit 2
+fi
+
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+# Check if File Manager components are installed
+if [ "$MODE" != "force" ] && [ ! -e "$FM_INSTALL_DIR" ]; then
+    echo "ERROR: File Manager components are not installed."
+    exit 1
+fi
+
+if [ "$MODE" != "force" ] && [ "$FILE_MANGER" = "false" ]; then
+    echo "ERROR: File Manager is not enabled."
+    exit 1
+fi
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+rm --recursive --force "$FM_INSTALL_DIR"
+$BIN/v-change-sys-config-value 'FILE_MANAGER' 'false'
+
+if [ "$MODE" != "quiet" ]; then
+    echo "File Manager has been removed from the system."
+fi
+
+#----------------------------------------------------------#
+#                       Logging                            #
+#----------------------------------------------------------#
+
+log_history "file manager uninstalled" '' 'admin'
+log_event "$OK" "$ARGUMENTS"

+ 10 - 6
bin/v-list-sys-config

@@ -41,6 +41,7 @@ json_list() {
         "DISK_QUOTA": "'$DISK_QUOTA'",
         "DISK_QUOTA": "'$DISK_QUOTA'",
         "FIREWALL_SYSTEM": "'$FIREWALL_SYSTEM'",
         "FIREWALL_SYSTEM": "'$FIREWALL_SYSTEM'",
         "FIREWALL_EXTENSION": "'$FIREWALL_EXTENSION'",
         "FIREWALL_EXTENSION": "'$FIREWALL_EXTENSION'",
+        "FILE_MANAGER": "'$FILE_MANAGER'",
         "REPOSITORY": "'$REPOSITORY'",
         "REPOSITORY": "'$REPOSITORY'",
         "VERSION": "'$VERSION'",
         "VERSION": "'$VERSION'",
         "RELEASE_BRANCH": "'$RELEASE_BRANCH'",
         "RELEASE_BRANCH": "'$RELEASE_BRANCH'",
@@ -134,6 +135,9 @@ shell_list() {
     if [ ! -z "$DEMO_MODE" ]; then
     if [ ! -z "$DEMO_MODE" ]; then
         echo "Demo Mode:        $DEMO_MODE"
         echo "Demo Mode:        $DEMO_MODE"
     fi
     fi
+    if [ ! -z "$FILE_MANAGER" ]; then
+        echo "File Manager:        $FILE_MANAGER"
+    fi
     echo "Release Branch:   $RELEASE_BRANCH"
     echo "Release Branch:   $RELEASE_BRANCH"
     echo "Theme:            $THEME"
     echo "Theme:            $THEME"
 }
 }
@@ -146,8 +150,8 @@ plain_list() {
     echo -ne "$ANTIVIRUS_SYSTEM\t$ANTISPAM_SYSTEM\t$DB_SYSTEM\t"
     echo -ne "$ANTIVIRUS_SYSTEM\t$ANTISPAM_SYSTEM\t$DB_SYSTEM\t"
     echo -ne "$DNS_SYSTEM\t$DNS_CLUSTER\t$STATS_SYSTEM\t$BACKUP_SYSTEM\t"
     echo -ne "$DNS_SYSTEM\t$DNS_CLUSTER\t$STATS_SYSTEM\t$BACKUP_SYSTEM\t"
     echo -ne "$CRON_SYSTEM\t$DISK_QUOTA\t$FIREWALL_SYSTEM\t$FIREWALL_EXTENSION\t"
     echo -ne "$CRON_SYSTEM\t$DISK_QUOTA\t$FIREWALL_SYSTEM\t$FIREWALL_EXTENSION\t"
-    echo -ne "$REPOSITORY\t$VERSION\t$DEMO_MODE\t$RELEASE_BRANCH\t$THEME\t$LANGUAGE\t"
-    echo -e "$BACKUP_GZIP\t$BACKUP\t$WEBMAIL_ALIAS\t$DB_PMA_ALIAS\t$DB_PGA_ALIAS"
+    echo -ne "$FILE_MANAGER\t$REPOSITORY\t$VERSION\t$DEMO_MODE\t$RELEASE_BRANCH\t$THEME\t"
+    echo -e "$LANGUAGE\t$BACKUP_GZIP\t$BACKUP\t$WEBMAIL_ALIAS\t$DB_PMA_URL\t$DB_PGA_URL"
 }
 }
 
 
 
 
@@ -159,7 +163,7 @@ csv_list() {
     echo -n "'ANTIVIRUS_SYSTEM','ANTISPAM_SYSTEM','DB_SYSTEM',"
     echo -n "'ANTIVIRUS_SYSTEM','ANTISPAM_SYSTEM','DB_SYSTEM',"
     echo -n "'DNS_SYSTEM','DNS_CLUSTER','STATS_SYSTEM','BACKUP_SYSTEM',"
     echo -n "'DNS_SYSTEM','DNS_CLUSTER','STATS_SYSTEM','BACKUP_SYSTEM',"
     echo -n "'CRON_SYSTEM','DISK_QUOTA','FIREWALL_SYSTEM',"
     echo -n "'CRON_SYSTEM','DISK_QUOTA','FIREWALL_SYSTEM',"
-    echo -n "'FIREWALL_EXTENSION','REPOSITORY',"
+    echo -n "'FIREWALL_EXTENSION','FILE_MANAGER','REPOSITORY',"
     echo -n "'VERSION','LANGUAGE','BACKUP_GZIP','BACKUP','WEBMAIL_ALIAS',"
     echo -n "'VERSION','LANGUAGE','BACKUP_GZIP','BACKUP','WEBMAIL_ALIAS',"
     echo -n "'DB_PMA_ALIAS','DB_PGA_ALIAS'"
     echo -n "'DB_PMA_ALIAS','DB_PGA_ALIAS'"
     echo
     echo
@@ -168,9 +172,9 @@ csv_list() {
     echo -n "'$PROXY_SSL_PORT','$FTP_SYSTEM','$MAIL_SYSTEM','$IMAP_SYSTEM',"
     echo -n "'$PROXY_SSL_PORT','$FTP_SYSTEM','$MAIL_SYSTEM','$IMAP_SYSTEM',"
     echo -n "'$ANTIVIRUS_SYSTEM','$ANTISPAM_SYSTEM','$DB_SYSTEM','$DNS_SYSTEM',"
     echo -n "'$ANTIVIRUS_SYSTEM','$ANTISPAM_SYSTEM','$DB_SYSTEM','$DNS_SYSTEM',"
     echo -n "'$DNS_CLUSTER','$STATS_SYSTEM','$BACKUP_SYSTEM','$CRON_SYSTEM',"
     echo -n "'$DNS_CLUSTER','$STATS_SYSTEM','$BACKUP_SYSTEM','$CRON_SYSTEM',"
-    echo -n "'$DISK_QUOTA','$FIREWALL_SYSTEM','$REPOSITORY','$FIREWALL_EXTENSION',"
-    echo -n "'$VERSION','$DEMO_MODE','$RELEASE_BRANCH','$THEME','$LANGUAGE',"
-    echo -n "'$BACKUP_GZIP','$BACKUP','$WEBMAIL_ALIAS','$DB_PMA_ALIAS','$DB_PGA_ALIAS'"
+    echo -n "'$DISK_QUOTA','$FIREWALL_SYSTEM','$FIREWALL_EXTENSION','$FILE_MANAGER',"
+    echo -n "'$REPOSITORY', '$VERSION','$DEMO_MODE','$RELEASE_BRANCH','$THEME','$LANGUAGE',"
+    echo -n "'$BACKUP_GZIP','$BACKUP','$WEBMAIL_ALIAS','$DB_PMA_URL','$DB_PGA_URL'"
     echo
     echo
 }
 }
 
 

+ 61 - 0
bin/v-restore-user

@@ -603,6 +603,67 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
             cp -f $tmpdir/mail/$domain/$backup_system/$domain.pub $USER_DATA/mail/
             cp -f $tmpdir/mail/$domain/$backup_system/$domain.pub $USER_DATA/mail/
         fi
         fi
 
 
+        # Restore SSL
+        check_config=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf | grep -o "SSL='yes'")
+        if [ ! -z "$check_config" ]; then
+            if [ ! -e "$HESTIA/data/users/$user/ssl/" ]; then
+                mkdir -p $HESTIA/data/users/$user/ssl/
+            fi
+            
+            if [ ! -e "$HOMEDIR/$user/conf/mail/$domain/ssl/" ]; then
+                mkdir -p $HOMEDIR/$user/conf/mail/$domain/ssl/
+            fi
+
+            # Add certificate to Hestia user configuration data directory
+            if [ -f $tmpdir/mail/$domain/$backup_system/ssl/$domain.crt ]; then
+                echo "path found"
+                cp -f $tmpdir/mail/$domain/$backup_system/ssl/$domain.crt $USER_DATA/ssl/mail.$domain.crt
+                cp -f $tmpdir/mail/$domain/$backup_system/ssl/$domain.key $USER_DATA/ssl/mail.$domain.key
+                cp -f $tmpdir/mail/$domain/$backup_system/ssl/$domain.crt $USER_DATA/ssl/mail.$domain.pem
+                if [ -e "$tmpdir/mail/$domain/$backup_system/ssl//$domain.ca" ]; then
+                    cp -f $tmpdir/mail/$domain/$backup_system/ssl//$domain.ca $USER_DATA/ssl/mail.$domain.ca
+                    echo >> $USER_DATA/ssl/mail.$domain.pem
+                    cat $USER_DATA/ssl/mail.$domain.ca >> $USER_DATA/ssl/mail.$domain.pem
+                fi
+            fi
+            
+            chmod 660 $USER_DATA/ssl/mail.$domain.*
+
+            # Add certificate to user home directory
+            cp -f $USER_DATA/ssl/mail.$domain.crt $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.crt
+            cp -f $USER_DATA/ssl/mail.$domain.key $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key
+            cp -f $USER_DATA/ssl/mail.$domain.pem $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem
+            if [ -e "$USER_DATA/ssl/mail.$domain.ca" ]; then
+                cp -f $USER_DATA/ssl/mail.$domain.ca $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.ca
+            fi
+
+            # Add domain SSL configuration to dovecot
+            if [ -f /etc/dovecot/conf.d/domains/$domain.conf ]; then
+                rm -f /etc/dovecot/conf.d/domains/$domain.conf
+            fi
+                
+            echo "" >> /etc/dovecot/conf.d/domains/$domain.conf
+            echo "local_name mail.$domain {" >> /etc/dovecot/conf.d/domains/$domain.conf
+            echo "  ssl_cert = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem" >> /etc/dovecot/conf.d/domains/$domain.conf
+            echo "  ssl_key = <$HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key" >> /etc/dovecot/conf.d/domains/$domain.conf
+            echo "}" >> /etc/dovecot/conf.d/domains/$domain.conf
+
+            # Add domain SSL configuration to exim4
+            # Cleanup broken symlinks
+            find /usr/local/hestia/ssl/mail -xtype l -delete
+
+            ln -s -f $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem /usr/local/hestia/ssl/mail/mail.$domain.crt
+            ln -s -f $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key /usr/local/hestia/ssl/mail/mail.$domain.key
+
+            # Set correct permissions on certificates
+            chmod 750 $HOMEDIR/$user/conf/mail/$domain/ssl
+            chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain/ssl
+            chmod 0644 $HOMEDIR/$user/conf/mail/$domain/ssl/*
+            chown -h $user:mail $HOMEDIR/$user/conf/mail/$domain/ssl/*
+            chmod -R 0644 /usr/local/hestia/ssl/mail/*
+            chown -h $user:mail /usr/local/hestia/ssl/mail/*
+        fi
+
         # Restoring email accounts
         # Restoring email accounts
         cp -f $tmpdir/mail/$domain/$backup_system/$domain.conf $USER_DATA/mail/
         cp -f $tmpdir/mail/$domain/$backup_system/$domain.conf $USER_DATA/mail/
 
 

+ 56 - 20
bin/v-update-sys-hestia-git

@@ -1,6 +1,16 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Autocompile Script for HestiaCP deb Files.
+# v-update-sys-hestia-git
+# Downloads and compiles/installs packages from GitHub repositories
+# Options:  REPOSITORY BRANCH INSTALL [PACKAGES]
+# Example:  v-update-sys-hestia-git hestiacp staging/beta install all
+#           - Will download from the hestiacp repository
+#           - Pulls code from staging/beta branch
+#           - install: installs package immediately
+#           - install-auto: installs package and schedules automatic updates from Git
+#           - 'all': (optional) - compiles nginx and php alongside panel.
+#                                 this option takes a long time, only use when needed
+
 
 
 # Define download function
 # Define download function
 download_file() {
 download_file() {
@@ -56,18 +66,20 @@ INSTALL_DIR='/usr/local/hestia'
 ARCHIVE_DIR="${BUILD_DIR}/archive"
 ARCHIVE_DIR="${BUILD_DIR}/archive"
 
 
 # Set command variables
 # Set command variables
-branch=$1
-install=$2
+fork=$1
+branch=$2
+install=$3
+flags=$4
 
 
 # Set Version for compiling
 # Set Version for compiling
-BUILD_VER=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/hestia/control | grep "Version:" | cut -d' ' -f2)
+BUILD_VER=$(curl -s https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/hestia/control | grep "Version:" | cut -d' ' -f2)
 BUILD_ARCH='amd64'
 BUILD_ARCH='amd64'
 HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
 HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
-NGINX_V=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/nginx/control |grep "Version:" |cut -d' ' -f2)
-OPENSSL_V='1.1.1c'
+NGINX_V=$(curl -s https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/nginx/control |grep "Version:" |cut -d' ' -f2)
+OPENSSL_V='1.1.1g'
 PCRE_V='8.43'
 PCRE_V='8.43'
 ZLIB_V='1.2.11'
 ZLIB_V='1.2.11'
-PHP_V=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/php/control |grep "Version:" |cut -d' ' -f2)
+PHP_V=$(curl -s https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/php/control |grep "Version:" |cut -d' ' -f2)
 
 
 # Create build directories
 # Create build directories
 rm -rf $BUILD_DIR
 rm -rf $BUILD_DIR
@@ -84,13 +96,26 @@ timestamp() {
 
 
 # Set install flags
 # Set install flags
 if [ ! -z "$1" ]; then
 if [ ! -z "$1" ]; then
+    fork_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/release/src/deb/hestia/control -o /dev/null)
+    if [ $fork_check -ne "200" ]; then
+        echo "ERROR: invalid repository name specified."
+        exit 1
+    else
+        echo "[!] Download code from GitHub repository: $fork"
+        fork="$1"
+    fi
+else
+    fork="hestiacp"
+fi
+
+if [ ! -z "$2" ]; then
     branch_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/hestia/control -o /dev/null)
     branch_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/hestia/control -o /dev/null)
     if [ $branch_check -ne "200" ]; then
     if [ $branch_check -ne "200" ]; then
-        echo "Error: invalid branch name specified."
+        echo "ERROR: invalid branch name specified."
         exit 1
         exit 1
     else
     else
         /usr/local/hestia/bin/v-change-sys-config-value 'RELEASE_BRANCH' "$branch"
         /usr/local/hestia/bin/v-change-sys-config-value 'RELEASE_BRANCH' "$branch"
-        echo "Changed release branch to $branch."
+        echo "[!] Changed system release branch to: $branch."
     fi
     fi
 else
 else
     source /usr/local/hestia/conf/hestia.conf
     source /usr/local/hestia/conf/hestia.conf
@@ -98,15 +123,15 @@ else
 fi
 fi
 
 
 if [ -z "$branch" ]; then
 if [ -z "$branch" ]; then
-    echo "No branch detected, please provide one using: v-update-sys-hestia-git branch"
+    echo "ERROR: No branch detected."
     exit
     exit
 fi
 fi
 
 
 
 
 # Install needed software
 # Install needed software
-echo "Updating system APT repositories..."
+echo "[*] Updating APT package cache..."
 apt-get -qq update > /dev/null 2>&1
 apt-get -qq update > /dev/null 2>&1
-echo "Installing dependencies for compilation..."
+echo "[*] Checking for missing dependencies and installing required libraries..."
 apt-get -qq install -y $SOFTWARE > /dev/null 2>&1
 apt-get -qq install -y $SOFTWARE > /dev/null 2>&1
 
 
 # Fix for Debian PHP Envroiment
 # Fix for Debian PHP Envroiment
@@ -115,14 +140,22 @@ ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl > /dev/null 2>&
 # Get system cpu cores
 # Get system cpu cores
 NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq |  awk '{print $4}')
 NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq |  awk '{print $4}')
 
 
-# Set packages to compile
-HESTIA_B='true'
+# Check for existence of flags argument and set packages to build
+if [ ! -z "$flags" ]; then
+    if [ "$flags" = "all" ]; then
+        HESTIA_B='true'
+        NGINX_B='true'
+        PHP_B='true'
+    fi
+else
+    HESTIA_B='true'
+fi
 
 
 # Set git repository raw path
 # Set git repository raw path
-GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
+GIT_REP='https://raw.githubusercontent.com/'$fork'/hestiacp/'$branch'/src/deb'
 
 
 # Generate Links for sourcecode
 # Generate Links for sourcecode
-HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
+HESTIA_ARCHIVE_LINK='https://github.com/'$fork'/hestiacp/archive/'$branch'.tar.gz'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
 PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
 PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
@@ -140,7 +173,7 @@ branch=$(echo "$branch" |sed 's/\//-/g');
 
 
 if [ "$NGINX_B" = true ] ; then
 if [ "$NGINX_B" = true ] ; then
 
 
-    echo "Building hestia-nginx package..."
+    echo "[*] Building Package: hestia-nginx (backend web server)..."
     # Change to build directory
     # Change to build directory
     cd $BUILD_DIR
     cd $BUILD_DIR
 
 
@@ -235,7 +268,7 @@ fi
 #################################################################################
 #################################################################################
 
 
 if [ "$PHP_B" = true ] ; then
 if [ "$PHP_B" = true ] ; then
-    echo "Building hestia-php package..."
+    echo "[*] Building Package: hestia-php (backend engine)..."
     # Change to build directory
     # Change to build directory
     cd $BUILD_DIR
     cd $BUILD_DIR
 
 
@@ -311,7 +344,7 @@ fi
 #################################################################################
 #################################################################################
 
 
 if [ "$HESTIA_B" = true ] ; then
 if [ "$HESTIA_B" = true ] ; then
-    echo "Building Hestia Control Panel package..."
+    echo "[*] Building Package: hestia (Control Panel)..."
     # Change to build directory
     # Change to build directory
     cd $BUILD_DIR
     cd $BUILD_DIR
 
 
@@ -389,8 +422,11 @@ install_build() {
 
 
 # Define installation routine
 # Define installation routine
 
 
-if [ "$install" = "yes" ]; then 
+if [ "$install" = "install" ] || [ "$install" = "yes" ] || [ "$install" = "install-auto" ]; then 
     install_build
     install_build
+    if [ "$install" = "install-auto" ]; then
+        $HESTIA/bin/v-add-cron-hestia-autoupdate git
+    fi
 else
 else
     warning_message
     warning_message
     read -p "Do you wish to proceed with the installation? [y/n] " answer
     read -p "Do you wish to proceed with the installation? [y/n] " answer

+ 9 - 29
bin/v-update-web-templates

@@ -27,41 +27,21 @@ if [ -d "${WEBTPL}" ]; then
     rm -rf "${WEBTPL}/unassigned" 2>/dev/null
     rm -rf "${WEBTPL}/unassigned" 2>/dev/null
 fi
 fi
 
 
-for php_ver in $(ls /etc/php/); do
-    [ ! -d "/etc/php/$php_ver/fpm/pool.d/" ] && continue
-    cp -f "$HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl"  ${WEBTPL}/php-fpm/PHP-${php_ver/\./_}.tpl
-done
-
-for webtpl_folder in $(ls $HESTIA_INSTALL_DIR/templates/web/* -d 2>/dev/null | egrep -v '/(nginx)$' ); do
-    cp -rf "${webtpl_folder}" "${WEBTPL}/"
-done
-
 [ -d "${WEBTPL}/nginx" ] || mkdir -p "${WEBTPL}/nginx"
 [ -d "${WEBTPL}/nginx" ] || mkdir -p "${WEBTPL}/nginx"
 
 
-# Update Multi-PHP templates
-php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null | wc -l)
-if [ "$php_versions" -gt 1 ] && [ -z "$WEB_BACKEND" ]; then
-    for v in $(ls /etc/php/); do
-        if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
-            continue
-        fi
-        v_tpl=$(echo "$v" | sed -e 's/[.]//')
-        cp -f "$HESTIA_INSTALL_DIR/multiphp/${WEB_SYSTEM}/PHP-${v_tpl}".* "${WEBTPL}/${WEB_SYSTEM}/"
-    done
-    chmod a+x "${WEBTPL}/${WEB_SYSTEM}/"*.sh 2> /dev/null
-
-    # Create default TPL symlink when missing and point to the last php version found
-    if [ ! -z $v_tpl ] && [ "$WEB_SYSTEM" = "nginx" ]; then
-        [ -e "${WEBTPL}/${WEB_SYSTEM}/default.sh"   ] || ln -s "${WEBTPL}/${WEB_SYSTEM}/PHP-${v_tpl}.sh" "${WEBTPL}/${WEB_SYSTEM}/default.sh"
-        [ -e "${WEBTPL}/${WEB_SYSTEM}/default.tpl"  ] || ln -s "${WEBTPL}/${WEB_SYSTEM}/PHP-${v_tpl}.tpl" "${WEBTPL}/${WEB_SYSTEM}/default.tpl"
-        [ -e "${WEBTPL}/${WEB_SYSTEM}/default.stpl" ] || ln -s "${WEBTPL}/${WEB_SYSTEM}/PHP-${v_tpl}.stpl" "${WEBTPL}/${WEB_SYSTEM}/default.stpl"
-    fi
-fi
-
 if [ "$PROXY_SYSTEM" = 'nginx' ] || [ "$WEB_BACKEND" = "php-fpm" ]; then
 if [ "$PROXY_SYSTEM" = 'nginx' ] || [ "$WEB_BACKEND" = "php-fpm" ]; then
     cp -rf "${HESTIA_INSTALL_DIR}/templates/web/nginx" "${WEBTPL}/"
     cp -rf "${HESTIA_INSTALL_DIR}/templates/web/nginx" "${WEBTPL}/"
 fi
 fi
 
 
+for webtpl_folder in $(ls $HESTIA_INSTALL_DIR/templates/web/* -d 2>/dev/null | egrep -v '/(nginx)$' ); do
+    cp -rf "${webtpl_folder}" "${WEBTPL}/"
+done
+
+for php_ver in $(ls /etc/php/); do
+    [ ! -d "/etc/php/$php_ver/fpm/pool.d/" ] && continue
+    cp -f "$HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl"  ${WEBTPL}/php-fpm/PHP-${php_ver/\./_}.tpl
+done
+
 # Rebuilding web domains
 # Rebuilding web domains
 for user in $($BIN/v-list-sys-users plain); do
 for user in $($BIN/v-list-sys-users plain); do
     $BIN/v-rebuild-web-domains $user no
     $BIN/v-rebuild-web-domains $user no

+ 11 - 11
func/upgrade.sh

@@ -18,7 +18,7 @@ upgrade_welcome_message() {
     echo "                            Version: $new_version                       "
     echo "                            Version: $new_version                       "
     echo "========================================================================"
     echo "========================================================================"
     echo
     echo
-    echo "(!) IMPORTANT INFORMATION:                                              "
+    echo "[ ! ] IMPORTANT INFORMATION:                                              "
     echo
     echo
     echo "Default configuration files and templates may be modified or replaced   "
     echo "Default configuration files and templates may be modified or replaced   "
     echo "during the upgrade process. You may restore these files from:           "
     echo "during the upgrade process. You may restore these files from:           "
@@ -77,7 +77,7 @@ upgrade_start_routine() {
     #####################################################################
     #####################################################################
     release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
     release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
     if [ -z "$release_branch_check" ]; then
     if [ -z "$release_branch_check" ]; then
-        echo "(*) Adding global release branch variable to system configuration..."
+        echo "[ * ] Adding global release branch variable to system configuration..."
         $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
         $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
     fi
     fi
 
 
@@ -102,8 +102,8 @@ upgrade_start_routine() {
 
 
     # Ensure that latest upgrade commands are processed if version is the same
     # Ensure that latest upgrade commands are processed if version is the same
     if [ $VERSION = "$new_version" ]; then
     if [ $VERSION = "$new_version" ]; then
-        echo "(!) The latest version of Hestia Control Panel is already installed."
-        echo "    Verifying configuration..."
+        echo "[ ! ] The latest version of Hestia Control Panel is already installed."
+        echo "      Verifying configuration..."
         echo ""
         echo ""
         source $HESTIA/install/upgrade/versions/latest.sh
         source $HESTIA/install/upgrade/versions/latest.sh
         VERSION="$new_version"
         VERSION="$new_version"
@@ -179,10 +179,10 @@ upgrade_phpmyadmin() {
 
 
         pma_release_file=$(ls /usr/share/phpmyadmin/RELEASE-DATE-* 2>/dev/null |tail -n 1)
         pma_release_file=$(ls /usr/share/phpmyadmin/RELEASE-DATE-* 2>/dev/null |tail -n 1)
         if version_ge "${pma_release_file##*-}" "$pma_v"; then
         if version_ge "${pma_release_file##*-}" "$pma_v"; then
-            echo "(!) phpMyAdmin v${pma_release_file##*-} is already installed, skipping update..."
+            echo "[ ! ] phpMyAdmin v${pma_release_file##*-} is already installed, skipping update..."
         else
         else
             # Display upgrade information
             # Display upgrade information
-            echo "(*) Upgrading phpMyAdmin to version v$pma_v..."
+            echo "[ * ] Upgrading phpMyAdmin to version v$pma_v..."
             [ -d /usr/share/phpmyadmin ] || mkdir -p /usr/share/phpmyadmin
             [ -d /usr/share/phpmyadmin ] || mkdir -p /usr/share/phpmyadmin
 
 
             # Download latest phpMyAdmin release
             # Download latest phpMyAdmin release
@@ -215,7 +215,7 @@ upgrade_phpmyadmin() {
 }
 }
 
 
 update_php_templates() {
 update_php_templates() {
-    echo "(*) Updating default PHP templates..."
+    echo "[ * ] Updating default PHP templates..."
     # Update default template
     # Update default template
     cp -f $HESTIA_INSTALL_DIR/templates/web/php-fpm/default.tpl \
     cp -f $HESTIA_INSTALL_DIR/templates/web/php-fpm/default.tpl \
         $HESTIA/data/templates/web/php-fpm/default.tpl
         $HESTIA/data/templates/web/php-fpm/default.tpl
@@ -229,7 +229,7 @@ update_php_templates() {
         $HESTIA/data/templates/web/php-fpm/socket.tpl
         $HESTIA/data/templates/web/php-fpm/socket.tpl
 
 
     for version in $($HESTIA/bin/v-list-sys-php plain); do 
     for version in $($HESTIA/bin/v-list-sys-php plain); do 
-        echo "(*) Updating templates for PHP ${version}..."
+        echo "[ * ] Updating templates for PHP ${version}..."
         cp -f $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl \
         cp -f $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl \
             $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl; 
             $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl; 
     done
     done
@@ -248,7 +248,7 @@ upgrade_set_version() {
 
 
 upgrade_rebuild_users() {
 upgrade_rebuild_users() {
     for user in $($HESTIA/bin/v-list-sys-users plain); do
     for user in $($HESTIA/bin/v-list-sys-users plain); do
-        echo "(*) Rebuilding domains and account for user: $user..."
+        echo "[ * ] Rebuilding domains and account for user: $user..."
         if [ ! -z "$WEB_SYSTEM" ]; then
         if [ ! -z "$WEB_SYSTEM" ]; then
             $BIN/v-rebuild-web-domains $user 'no' >/dev/null 2>&1
             $BIN/v-rebuild-web-domains $user 'no' >/dev/null 2>&1
         fi
         fi
@@ -265,12 +265,12 @@ upgrade_restart_services() {
     # Refresh user interface theme
     # Refresh user interface theme
     if [ "$THEME" ]; then
     if [ "$THEME" ]; then
         if [ "$THEME" != "default" ]; then
         if [ "$THEME" != "default" ]; then
-            echo "(*) Applying user interface updates..."
+            echo "[ * ] Applying user interface updates..."
             $BIN/v-change-sys-theme $THEME
             $BIN/v-change-sys-theme $THEME
         fi
         fi
     fi
     fi
 
 
-    echo "(*) Restarting services..."
+    echo "[ * ] Restarting services..."
     sleep 5
     sleep 5
     if [ ! -z "$MAIL_SYSTEM" ]; then
     if [ ! -z "$MAIL_SYSTEM" ]; then
         $BIN/v-restart-mail $restart
         $BIN/v-restart-mail $restart

+ 38 - 38
install/hst-install-debian.sh

@@ -312,35 +312,35 @@ mkdir -p $hst_backups
 
 
 # Checking ntpdate
 # Checking ntpdate
 if [ ! -e '/usr/sbin/ntpdate' ]; then
 if [ ! -e '/usr/sbin/ntpdate' ]; then
-    echo "(*) Installing ntpdate..."
+    echo "[ * ] Installing ntpdate..."
     apt-get -y install ntpdate >> $LOG
     apt-get -y install ntpdate >> $LOG
     check_result $? "Can't install ntpdate"
     check_result $? "Can't install ntpdate"
 fi
 fi
 
 
 # Checking wget
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
 if [ ! -e '/usr/bin/wget' ]; then
-    echo "(*) Installing wget..."
+    echo "[ * ] Installing wget..."
     apt-get -y install wget >> $LOG
     apt-get -y install wget >> $LOG
     check_result $? "Can't install wget"
     check_result $? "Can't install wget"
 fi
 fi
 
 
 # Checking dirmngr
 # Checking dirmngr
 if [ ! -e '/usr/bin/dirmngr' ]; then
 if [ ! -e '/usr/bin/dirmngr' ]; then
-    echo "(*) Installing dirmngr..."
+    echo "[ * ] Installing dirmngr..."
     apt-get -y install dirmngr >> $LOG
     apt-get -y install dirmngr >> $LOG
     check_result $? "Can't install dirmngr"
     check_result $? "Can't install dirmngr"
 fi
 fi
 
 
 # Check if apt-transport-https is installed
 # Check if apt-transport-https is installed
 if [ ! -e '/usr/lib/apt/methods/https' ]; then
 if [ ! -e '/usr/lib/apt/methods/https' ]; then
-    echo "(*) Installing apt-transport-https..."
+    echo "[ * ] Installing apt-transport-https..."
     apt-get -y install apt-transport-https >> $LOG
     apt-get -y install apt-transport-https >> $LOG
     check_result $? "Can't install apt-transport-https"
     check_result $? "Can't install apt-transport-https"
 fi
 fi
 
 
 # Check if gnupg or gnupg2 is installed
 # Check if gnupg or gnupg2 is installed
 if [ ! -e '/usr/lib/gnupg2' ] || [ ! -e '/usr/lib/gnupg' ]; then
 if [ ! -e '/usr/lib/gnupg2' ] || [ ! -e '/usr/lib/gnupg' ]; then
-    echo "(*) Installing gnupg2..."
+    echo "[ * ] Installing gnupg2..."
     apt-get -y install gnupg2 >> $LOG
     apt-get -y install gnupg2 >> $LOG
     check_result $? "Can't install gnupg2"
     check_result $? "Can't install gnupg2"
 fi
 fi
@@ -613,21 +613,21 @@ echo
 
 
 # Installing Nginx repo
 # Installing Nginx repo
 if [ "$nginx" = 'yes' ]; then
 if [ "$nginx" = 'yes' ]; then
-    echo "(*) NGINX"
+    echo "[ * ] NGINX"
     echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
     echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
     wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
     wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev/null 2>&1
 fi
 fi
 
 
 # Installing sury PHP repo
 # Installing sury PHP repo
-echo "(*) PHP"
+echo "[ * ] PHP"
 echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
 echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
 wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
 wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/null 2>&1
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/null 2>&1
 
 
 # Installing sury Apache2 repo
 # Installing sury Apache2 repo
 if [ "$apache" = 'yes' ]; then
 if [ "$apache" = 'yes' ]; then
-    echo "(*) Apache2"
+    echo "[ * ] Apache2"
     echo "deb https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list
     echo "deb https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list
     wget --quiet https://packages.sury.org/apache2/apt.gpg -O /tmp/apache2_signing.key
     wget --quiet https://packages.sury.org/apache2/apt.gpg -O /tmp/apache2_signing.key
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/apache2_signing.key > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/apache2_signing.key > /dev/null 2>&1
@@ -635,7 +635,7 @@ fi
 
 
 # Installing MariaDB repo
 # Installing MariaDB repo
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
-    echo "(*) MariaDB"
+    echo "[ * ] MariaDB"
     echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
     echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
     if [ "$release" -eq 8 ]; then
     if [ "$release" -eq 8 ]; then
         APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
         APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
@@ -650,13 +650,13 @@ if [ "$release" -eq 8 ]; then
 fi
 fi
 
 
 # Installing HestiaCP repo
 # Installing HestiaCP repo
-echo "(*) Hestia Control Panel"
+echo "[ * ] Hestia Control Panel"
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
 
 
 # Installing PostgreSQL repo
 # Installing PostgreSQL repo
 if [ "$postgresql" = 'yes' ]; then
 if [ "$postgresql" = 'yes' ]; then
-    echo "(*) PostgreSQL"
+    echo "[ * ] PostgreSQL"
     echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
     echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
     wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
     wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
@@ -888,7 +888,7 @@ echo
 
 
 # Install Hestia packages from local folder
 # Install Hestia packages from local folder
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
-    echo "(*) Installing local package files..."
+    echo "[ * ] Installing local package files..."
     echo "    - hestia core package"
     echo "    - hestia core package"
     dpkg -i $withdebs/hestia_*.deb > /dev/null 2>&1
     dpkg -i $withdebs/hestia_*.deb > /dev/null 2>&1
 
 
@@ -917,7 +917,7 @@ rm -f /usr/sbin/policy-rc.d
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 
 
-echo "(*) Configuring system settings..."
+echo "[ * ] Configuring system settings..."
 # Enable SSH password authentication
 # Enable SSH password authentication
 sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 
 
@@ -979,7 +979,7 @@ fi
 #                     Configure Hestia                     #
 #                     Configure Hestia                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring Hestia Control Panel..."
+echo "[ * ] Configuring Hestia Control Panel..."
 # Installing sudo configuration
 # Installing sudo configuration
 mkdir -p /etc/sudoers.d
 mkdir -p /etc/sudoers.d
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
@@ -1151,7 +1151,7 @@ cp -rf $HESTIA_INSTALL_DIR/firewall $HESTIA/data/
 $HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
 $HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
 
 
 # Generating SSL certificate
 # Generating SSL certificate
-echo "(*) Generating default self-signed SSL certificate..."
+echo "[ * ] Generating default self-signed SSL certificate..."
 $HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
 $HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
      'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
      'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
 
 
@@ -1161,7 +1161,7 @@ key_start=$(grep -n "BEGIN RSA" /tmp/hst.pem |cut -f 1 -d:)
 key_end=$(grep -n  "END RSA" /tmp/hst.pem |cut -f 1 -d:)
 key_end=$(grep -n  "END RSA" /tmp/hst.pem |cut -f 1 -d:)
 
 
 # Adding SSL certificate
 # Adding SSL certificate
-echo "(*) Adding SSL certificate to Hestia Control Panel..."
+echo "[ * ] Adding SSL certificate to Hestia Control Panel..."
 cd $HESTIA/ssl
 cd $HESTIA/ssl
 sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
 sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
 sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
 sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
@@ -1177,7 +1177,7 @@ cp -f $HESTIA_INSTALL_DIR/ssl/dhparam.pem /etc/ssl
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$nginx" = 'yes' ]; then
 if [ "$nginx" = 'yes' ]; then
-    echo "(*) Configuring NGINX..."
+    echo "[ * ] Configuring NGINX..."
     rm -f /etc/nginx/conf.d/*.conf
     rm -f /etc/nginx/conf.d/*.conf
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
     cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/
     cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/
@@ -1211,7 +1211,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$apache" = 'yes' ]; then
 if [ "$apache" = 'yes' ]; then
-    echo "(*) Configuring Apache Web Server..."
+    echo "[ * ] Configuring Apache Web Server..."
 
 
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d/domains
     mkdir -p /etc/apache2/conf.d/domains
@@ -1274,13 +1274,13 @@ if [ "$multiphp" = 'yes' ] ; then
     for v in "${multiphp_v[@]}"; do
     for v in "${multiphp_v[@]}"; do
         cp -r /etc/php/$v/ /root/hst_install_backups/php$v/
         cp -r /etc/php/$v/ /root/hst_install_backups/php$v/
         rm -f /etc/php/$v/fpm/pool.d/*
         rm -f /etc/php/$v/fpm/pool.d/*
-        echo "(*) Install PHP version $v..."
+        echo "[ * ] Install PHP version $v..."
         $HESTIA/bin/v-add-web-php "$v" > /dev/null 2>&1
         $HESTIA/bin/v-add-web-php "$v" > /dev/null 2>&1
     done
     done
 fi
 fi
 
 
 if [ "$phpfpm" = 'yes' ]; then
 if [ "$phpfpm" = 'yes' ]; then
-    echo "(*) Configuring PHP-FPM..."
+    echo "[ * ] Configuring PHP-FPM..."
     $HESTIA/bin/v-add-web-php "$fpm_v" > /dev/null 2>&1
     $HESTIA/bin/v-add-web-php "$fpm_v" > /dev/null 2>&1
     cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
     cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
     update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
     update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
@@ -1294,7 +1294,7 @@ fi
 #                     Configure PHP                        #
 #                     Configure PHP                        #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring PHP..."
+echo "[ * ] Configuring PHP..."
 ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
 ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
 if [ -z "$ZONE" ]; then
 if [ -z "$ZONE" ]; then
     ZONE='UTC'
     ZONE='UTC'
@@ -1316,7 +1316,7 @@ chmod 755 /etc/cron.daily/php-session-cleanup
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$vsftpd" = 'yes' ]; then
 if [ "$vsftpd" = 'yes' ]; then
-    echo "(*) Configuring Vsftpd server..."
+    echo "[ * ] Configuring Vsftpd server..."
     cp -f $HESTIA_INSTALL_DIR/vsftpd/vsftpd.conf /etc/
     cp -f $HESTIA_INSTALL_DIR/vsftpd/vsftpd.conf /etc/
     touch /var/log/vsftpd.log
     touch /var/log/vsftpd.log
     chown root:adm /var/log/vsftpd.log
     chown root:adm /var/log/vsftpd.log
@@ -1336,7 +1336,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$proftpd" = 'yes' ]; then
 if [ "$proftpd" = 'yes' ]; then
-    echo "(*) Configuring ProFTPD server..."
+    echo "[ * ] Configuring ProFTPD server..."
     echo "127.0.0.1 $servername" >> /etc/hosts
     echo "127.0.0.1 $servername" >> /etc/hosts
     cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
     cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
     update-rc.d proftpd defaults > /dev/null 2>&1
     update-rc.d proftpd defaults > /dev/null 2>&1
@@ -1350,7 +1350,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
-    echo "(*) Configuring MariaDB database server..."
+    echo "[ * ] Configuring MariaDB database server..."
     mycnf="my-small.cnf"
     mycnf="my-small.cnf"
     if [ $memory -gt 1200000 ]; then
     if [ $memory -gt 1200000 ]; then
         mycnf="my-medium.cnf"
         mycnf="my-medium.cnf"
@@ -1396,7 +1396,7 @@ fi
 
 
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
     # Display upgrade information
     # Display upgrade information
-    echo "(*) Installing phpMyAdmin version v$pma_v..."
+    echo "[ * ] Installing phpMyAdmin version v$pma_v..."
 
 
     # Download latest phpmyadmin release
     # Download latest phpmyadmin release
     wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
     wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
@@ -1436,7 +1436,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$postgresql" = 'yes' ]; then
 if [ "$postgresql" = 'yes' ]; then
-    echo "(*) Configuring PostgreSQL database server..."
+    echo "[ * ] Configuring PostgreSQL database server..."
     ppass=$(gen_pass)
     ppass=$(gen_pass)
     cp -f $HESTIA_INSTALL_DIR/postgresql/pg_hba.conf /etc/postgresql/*/main/
     cp -f $HESTIA_INSTALL_DIR/postgresql/pg_hba.conf /etc/postgresql/*/main/
     systemctl restart postgresql
     systemctl restart postgresql
@@ -1458,7 +1458,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$named" = 'yes' ]; then
 if [ "$named" = 'yes' ]; then
-    echo "(*) Configuring Bind DNS server..."
+    echo "[ * ] Configuring Bind DNS server..."
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf.options /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf.options /etc/bind/
     chown root:bind /etc/bind/named.conf
     chown root:bind /etc/bind/named.conf
@@ -1490,7 +1490,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$exim" = 'yes' ]; then
 if [ "$exim" = 'yes' ]; then
-    echo "(*) Configuring Exim mail server..."
+    echo "[ * ] Configuring Exim mail server..."
     gpasswd -a Debian-exim mail > /dev/null 2>&1
     gpasswd -a Debian-exim mail > /dev/null 2>&1
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/dnsbl.conf /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/dnsbl.conf /etc/exim4/
@@ -1525,7 +1525,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$dovecot" = 'yes' ]; then
 if [ "$dovecot" = 'yes' ]; then
-    echo "(*) Configuring Dovecot POP/IMAP mail server..."
+    echo "[ * ] Configuring Dovecot POP/IMAP mail server..."
     gpasswd -a dovecot mail > /dev/null 2>&1
     gpasswd -a dovecot mail > /dev/null 2>&1
     cp -rf $HESTIA_INSTALL_DIR/dovecot /etc/
     cp -rf $HESTIA_INSTALL_DIR/dovecot /etc/
     cp -f $HESTIA_INSTALL_DIR/logrotate/dovecot /etc/logrotate.d/
     cp -f $HESTIA_INSTALL_DIR/logrotate/dovecot /etc/logrotate.d/
@@ -1559,7 +1559,7 @@ if [ "$clamd" = 'yes' ]; then
             /lib/systemd/system/clamav-daemon.service
             /lib/systemd/system/clamav-daemon.service
         systemctl daemon-reload
         systemctl daemon-reload
     fi
     fi
-    echo -ne "(*) Installing ClamAV anti-virus definitions... "
+    echo -ne "[ * ] Installing ClamAV anti-virus definitions... "
     /usr/bin/freshclam >> $LOG &
     /usr/bin/freshclam >> $LOG &
     BACK_PID=$!
     BACK_PID=$!
     spin_i=1
     spin_i=1
@@ -1578,7 +1578,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$spamd" = 'yes' ]; then
 if [ "$spamd" = 'yes' ]; then
-    echo "(*) Configuring SpamAssassin..."
+    echo "[ * ] Configuring SpamAssassin..."
     update-rc.d spamassassin defaults > /dev/null 2>&1
     update-rc.d spamassassin defaults > /dev/null 2>&1
     sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
     sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
     systemctl start spamassassin >> $LOG
     systemctl start spamassassin >> $LOG
@@ -1595,7 +1595,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
 if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
-    echo "(*) Configuring Roundcube webmail client..."
+    echo "[ * ] Configuring Roundcube webmail client..."
     cp -f $HESTIA_INSTALL_DIR/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/config.inc.php /etc/roundcube/plugins/password/
     cp -f $HESTIA_INSTALL_DIR/roundcube/config.inc.php /etc/roundcube/plugins/password/
@@ -1677,7 +1677,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$fail2ban" = 'yes' ]; then
 if [ "$fail2ban" = 'yes' ]; then
-    echo "(*) Configuring fail2ban access monitor..."
+    echo "[ * ] Configuring fail2ban access monitor..."
     cp -rf $HESTIA_INSTALL_DIR/fail2ban /etc/
     cp -rf $HESTIA_INSTALL_DIR/fail2ban /etc/
     if [ "$dovecot" = 'no' ]; then
     if [ "$dovecot" = 'no' ]; then
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
@@ -1848,7 +1848,7 @@ command="sudo $HESTIA/bin/v-update-sys-rrd"
 $HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
 $HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
 
 
 # Enable automatic updates
 # Enable automatic updates
-$HESTIA/bin/v-add-cron-hestia-autoupdate
+$HESTIA/bin/v-add-cron-hestia-autoupdate apt
 
 
 # Building initital rrd images
 # Building initital rrd images
 $HESTIA/bin/v-update-sys-rrd
 $HESTIA/bin/v-update-sys-rrd
@@ -1865,7 +1865,7 @@ $HESTIA/bin/v-change-sys-port $port > /dev/null 2>&1
 $HESTIA/bin/v-change-sys-theme 'default'
 $HESTIA/bin/v-change-sys-theme 'default'
 
 
 # Update remaining packages since repositories have changed
 # Update remaining packages since repositories have changed
-echo -ne "(*) Installing remaining software updates..."
+echo -ne "[ * ] Installing remaining software updates..."
 apt-get -qq update
 apt-get -qq update
 apt-get -y upgrade >> $LOG &
 apt-get -y upgrade >> $LOG &
 BACK_PID=$!
 BACK_PID=$!
@@ -1882,8 +1882,8 @@ chown admin:admin $HESTIA/data/sessions
 #                  Configure File Manager                   #
 #                  Configure File Manager                   #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring File Manager..."
-source $HESTIA_INSTALL_DIR/filemanager/install-fm.sh > /dev/null 2>&1
+echo "[ * ] Configuring File Manager..."
+$HESTIA/bin/v-add-sys-filemanager quiet
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -1945,7 +1945,7 @@ rm -f $tmpfile
 # Add welcome message to notification panel
 # Add welcome message to notification panel
 $HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a> or e-mail <a href="mailto:info@hestiacp.com?Subject="['$new_version'] Bug Report: ">info@hestiacp.com</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
 $HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a> or e-mail <a href="mailto:info@hestiacp.com?Subject="['$new_version'] Bug Report: ">info@hestiacp.com</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
 
 
-echo "(!) IMPORTANT: You must logout or restart the server before continuing."
+echo "[ ! ] IMPORTANT: You must logout or restart the server before continuing."
 echo ""
 echo ""
 if [ "$interactive" = 'yes' ]; then
 if [ "$interactive" = 'yes' ]; then
     echo -n " Do you want to reboot now? [Y/N] "
     echo -n " Do you want to reboot now? [Y/N] "

+ 38 - 38
install/hst-install-ubuntu.sh

@@ -294,35 +294,35 @@ mkdir -p $hst_backups
 
 
 # Checking ntpdate
 # Checking ntpdate
 if [ ! -e '/usr/sbin/ntpdate' ]; then
 if [ ! -e '/usr/sbin/ntpdate' ]; then
-    echo "(*) Installing ntpdate..."
+    echo "[ * ] Installing ntpdate..."
     apt-get -y install ntpdate >> $LOG
     apt-get -y install ntpdate >> $LOG
     check_result $? "Can't install ntpdate"
     check_result $? "Can't install ntpdate"
 fi
 fi
 
 
 # Checking wget
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
 if [ ! -e '/usr/bin/wget' ]; then
-    echo "(*) Installing wget..."
+    echo "[ * ] Installing wget..."
     apt-get -y install wget >> $LOG
     apt-get -y install wget >> $LOG
     check_result $? "Can't install wget"
     check_result $? "Can't install wget"
 fi
 fi
 
 
 # Check if apt-transport-https is installed
 # Check if apt-transport-https is installed
 if [ ! -e '/usr/lib/apt/methods/https' ]; then
 if [ ! -e '/usr/lib/apt/methods/https' ]; then
-    echo "(*) Installing apt-transport-https..."
+    echo "[ * ] Installing apt-transport-https..."
     apt-get -y install apt-transport-https >> $LOG
     apt-get -y install apt-transport-https >> $LOG
     check_result $? "Can't install apt-transport-https"
     check_result $? "Can't install apt-transport-https"
 fi
 fi
 
 
 # Check if apt-add-repository is installed
 # Check if apt-add-repository is installed
 if [ ! -e '/usr/bin/apt-add-repository' ]; then
 if [ ! -e '/usr/bin/apt-add-repository' ]; then
-    echo "(*) Installing apt-add-repository..."
+    echo "[ * ] Installing apt-add-repository..."
     apt-get -y install software-properties-common >> $LOG
     apt-get -y install software-properties-common >> $LOG
     check_result $? "Can't install software-properties-common"
     check_result $? "Can't install software-properties-common"
 fi
 fi
 
 
 # Check if gnupg or gnupg2 is installed
 # Check if gnupg or gnupg2 is installed
 if [ ! -e '/usr/lib/gnupg2' ] || [ ! -e '/usr/lib/gnupg' ]; then
 if [ ! -e '/usr/lib/gnupg2' ] || [ ! -e '/usr/lib/gnupg' ]; then
-    echo "(*) Installing gnupg2..."
+    echo "[ * ] Installing gnupg2..."
     apt-get -y install gnupg2 >> $LOG
     apt-get -y install gnupg2 >> $LOG
     check_result $? "Can't install gnupg2"
     check_result $? "Can't install gnupg2"
 fi
 fi
@@ -588,7 +588,7 @@ echo
 
 
 # Installing Nginx repo
 # Installing Nginx repo
 if [ "$nginx" = 'yes' ]; then
 if [ "$nginx" = 'yes' ]; then
-    echo "(*) NGINX"
+    echo "[ * ] NGINX"
     echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
     echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
     > $apt/nginx.list
     > $apt/nginx.list
     wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
     wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
@@ -596,30 +596,30 @@ if [ "$nginx" = 'yes' ]; then
 fi
 fi
 
 
 # Installing sury PHP repo
 # Installing sury PHP repo
-echo "(*) PHP"
+echo "[ * ] PHP"
 LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
 LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
 
 
 # Installing sury Apache2 repo
 # Installing sury Apache2 repo
 if [ "$apache" = 'yes' ]; then
 if [ "$apache" = 'yes' ]; then
-    echo "(*) Apache2"
+    echo "[ * ] Apache2"
     echo "deb http://ppa.launchpad.net/ondrej/apache2/ubuntu $codename main" > $apt/apache2.list
     echo "deb http://ppa.launchpad.net/ondrej/apache2/ubuntu $codename main" > $apt/apache2.list
 fi
 fi
 
 
 # Installing MariaDB repo
 # Installing MariaDB repo
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
-    echo "(*) MariaDB"
+    echo "[ * ] MariaDB"
     echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
     echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
 fi
 fi
 
 
 # Installing HestiaCP repo
 # Installing HestiaCP repo
-echo "(*) Hestia Control Panel"
+echo "[ * ] Hestia Control Panel"
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
 
 
 # Installing PostgreSQL repo
 # Installing PostgreSQL repo
 if [ "$postgresql" = 'yes' ]; then
 if [ "$postgresql" = 'yes' ]; then
-    echo "(*) PostgreSQL"
+    echo "[ * ] PostgreSQL"
     echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
     echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
     wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
     wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
@@ -886,7 +886,7 @@ echo
 
 
 # Install Hestia packages from local folder
 # Install Hestia packages from local folder
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
-    echo "(*) Installing local package files..."
+    echo "[ * ] Installing local package files..."
     echo "    - hestia core package"
     echo "    - hestia core package"
     dpkg -i $withdebs/hestia_*.deb > /dev/null 2>&1
     dpkg -i $withdebs/hestia_*.deb > /dev/null 2>&1
 
 
@@ -915,7 +915,7 @@ rm -f /usr/sbin/policy-rc.d
 #                     Configure system                     #
 #                     Configure system                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring system settings..."
+echo "[ * ] Configuring system settings..."
 # Enable SSH password authentication
 # Enable SSH password authentication
 sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 
 
@@ -1013,7 +1013,7 @@ fi
 #                     Configure Hestia                     #
 #                     Configure Hestia                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring Hestia Control Panel..."
+echo "[ * ] Configuring Hestia Control Panel..."
 # Installing sudo configuration
 # Installing sudo configuration
 mkdir -p /etc/sudoers.d
 mkdir -p /etc/sudoers.d
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
@@ -1179,7 +1179,7 @@ cp -rf $HESTIA_INSTALL_DIR/firewall $HESTIA/data/
 $HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
 $HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
 
 
 # Generating SSL certificate
 # Generating SSL certificate
-echo "(*) Generating default self-signed SSL certificate..."
+echo "[ * ] Generating default self-signed SSL certificate..."
 $HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
 $HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
      'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
      'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
 
 
@@ -1189,7 +1189,7 @@ key_start=$(grep -n "BEGIN RSA" /tmp/hst.pem |cut -f 1 -d:)
 key_end=$(grep -n  "END RSA" /tmp/hst.pem |cut -f 1 -d:)
 key_end=$(grep -n  "END RSA" /tmp/hst.pem |cut -f 1 -d:)
 
 
 # Adding SSL certificate
 # Adding SSL certificate
-echo "(*) Adding SSL certificate to Hestia Control Panel..."
+echo "[ * ] Adding SSL certificate to Hestia Control Panel..."
 cd $HESTIA/ssl
 cd $HESTIA/ssl
 sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
 sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
 sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
 sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
@@ -1211,7 +1211,7 @@ cp -f $HESTIA_INSTALL_DIR/ssl/dhparam.pem /etc/ssl
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$nginx" = 'yes' ]; then
 if [ "$nginx" = 'yes' ]; then
-    echo "(*) Configuring NGINX..."
+    echo "[ * ] Configuring NGINX..."
     rm -f /etc/nginx/conf.d/*.conf
     rm -f /etc/nginx/conf.d/*.conf
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
     cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/
     cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/
@@ -1245,7 +1245,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$apache" = 'yes' ]; then
 if [ "$apache" = 'yes' ]; then
-    echo "(*) Configuring Apache Web Server..."
+    echo "[ * ] Configuring Apache Web Server..."
 
 
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d/domains
     mkdir -p /etc/apache2/conf.d/domains
@@ -1305,13 +1305,13 @@ if [ "$multiphp" = 'yes' ] ; then
     for v in "${multiphp_v[@]}"; do
     for v in "${multiphp_v[@]}"; do
         cp -r /etc/php/$v/ /root/hst_install_backups/php$v/
         cp -r /etc/php/$v/ /root/hst_install_backups/php$v/
         rm -f /etc/php/$v/fpm/pool.d/*
         rm -f /etc/php/$v/fpm/pool.d/*
-        echo "(*) Install PHP version $v..."
+        echo "[ * ] Install PHP version $v..."
         $HESTIA/bin/v-add-web-php "$v" > /dev/null 2>&1
         $HESTIA/bin/v-add-web-php "$v" > /dev/null 2>&1
     done
     done
 fi
 fi
 
 
 if [ "$phpfpm" = 'yes' ]; then
 if [ "$phpfpm" = 'yes' ]; then
-    echo "(*) Configuring PHP-FPM..."
+    echo "[ * ] Configuring PHP-FPM..."
     $HESTIA/bin/v-add-web-php "$fpm_v" > /dev/null 2>&1
     $HESTIA/bin/v-add-web-php "$fpm_v" > /dev/null 2>&1
     cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
     cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
     update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
     update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
@@ -1325,7 +1325,7 @@ fi
 #                     Configure PHP                        #
 #                     Configure PHP                        #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring PHP..."
+echo "[ * ] Configuring PHP..."
 ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
 ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
 if [ -z "$ZONE" ]; then
 if [ -z "$ZONE" ]; then
     ZONE='UTC'
     ZONE='UTC'
@@ -1347,7 +1347,7 @@ chmod 755 /etc/cron.daily/php-session-cleanup
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$vsftpd" = 'yes' ]; then
 if [ "$vsftpd" = 'yes' ]; then
-    echo "(*) Configuring Vsftpd server..."
+    echo "[ * ] Configuring Vsftpd server..."
     cp -f $HESTIA_INSTALL_DIR/vsftpd/vsftpd.conf /etc/
     cp -f $HESTIA_INSTALL_DIR/vsftpd/vsftpd.conf /etc/
     touch /var/log/vsftpd.log
     touch /var/log/vsftpd.log
     chown root:adm /var/log/vsftpd.log
     chown root:adm /var/log/vsftpd.log
@@ -1367,7 +1367,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$proftpd" = 'yes' ]; then
 if [ "$proftpd" = 'yes' ]; then
-    echo "(*) Configuring ProFTPD server..."
+    echo "[ * ] Configuring ProFTPD server..."
     echo "127.0.0.1 $servername" >> /etc/hosts
     echo "127.0.0.1 $servername" >> /etc/hosts
     cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
     cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
     update-rc.d proftpd defaults > /dev/null 2>&1
     update-rc.d proftpd defaults > /dev/null 2>&1
@@ -1381,7 +1381,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
-    echo "(*) Configuring MariaDB database server..."
+    echo "[ * ] Configuring MariaDB database server..."
     mycnf="my-small.cnf"
     mycnf="my-small.cnf"
     if [ $memory -gt 1200000 ]; then
     if [ $memory -gt 1200000 ]; then
         mycnf="my-medium.cnf"
         mycnf="my-medium.cnf"
@@ -1427,7 +1427,7 @@ fi
 
 
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then
     # Display upgrade information
     # Display upgrade information
-    echo "(*) Installing phpMyAdmin version v$pma_v..."
+    echo "[ * ] Installing phpMyAdmin version v$pma_v..."
 
 
     # Download latest phpmyadmin release
     # Download latest phpmyadmin release
     wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
     wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
@@ -1468,7 +1468,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$postgresql" = 'yes' ]; then
 if [ "$postgresql" = 'yes' ]; then
-    echo "(*) Configuring PostgreSQL database server..."
+    echo "[ * ] Configuring PostgreSQL database server..."
     ppass=$(gen_pass)
     ppass=$(gen_pass)
     cp -f $HESTIA_INSTALL_DIR/postgresql/pg_hba.conf /etc/postgresql/*/main/
     cp -f $HESTIA_INSTALL_DIR/postgresql/pg_hba.conf /etc/postgresql/*/main/
     systemctl restart postgresql
     systemctl restart postgresql
@@ -1490,7 +1490,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$named" = 'yes' ]; then
 if [ "$named" = 'yes' ]; then
-    echo "(*) Configuring Bind DNS server..."
+    echo "[ * ] Configuring Bind DNS server..."
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf.options /etc/bind/
     cp -f $HESTIA_INSTALL_DIR/bind/named.conf.options /etc/bind/
     chown root:bind /etc/bind/named.conf
     chown root:bind /etc/bind/named.conf
@@ -1527,7 +1527,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$exim" = 'yes' ]; then
 if [ "$exim" = 'yes' ]; then
-    echo "(*) Configuring Exim mail server..."
+    echo "[ * ] Configuring Exim mail server..."
     gpasswd -a Debian-exim mail > /dev/null 2>&1
     gpasswd -a Debian-exim mail > /dev/null 2>&1
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/dnsbl.conf /etc/exim4/
     cp -f $HESTIA_INSTALL_DIR/exim/dnsbl.conf /etc/exim4/
@@ -1563,7 +1563,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$dovecot" = 'yes' ]; then
 if [ "$dovecot" = 'yes' ]; then
-    echo "(*) Configuring Dovecot POP/IMAP mail server..."
+    echo "[ * ] Configuring Dovecot POP/IMAP mail server..."
     gpasswd -a dovecot mail > /dev/null 2>&1
     gpasswd -a dovecot mail > /dev/null 2>&1
     cp -rf $HESTIA_INSTALL_DIR/dovecot /etc/
     cp -rf $HESTIA_INSTALL_DIR/dovecot /etc/
     cp -f $HESTIA_INSTALL_DIR/logrotate/dovecot /etc/logrotate.d/
     cp -f $HESTIA_INSTALL_DIR/logrotate/dovecot /etc/logrotate.d/
@@ -1586,7 +1586,7 @@ if [ "$clamd" = 'yes' ]; then
     gpasswd -a clamav Debian-exim > /dev/null 2>&1
     gpasswd -a clamav Debian-exim > /dev/null 2>&1
     cp -f $HESTIA_INSTALL_DIR/clamav/clamd.conf /etc/clamav/
     cp -f $HESTIA_INSTALL_DIR/clamav/clamd.conf /etc/clamav/
     update-rc.d clamav-daemon defaults
     update-rc.d clamav-daemon defaults
-    echo -ne "(*) Installing ClamAV anti-virus definitions... "
+    echo -ne "[ * ] Installing ClamAV anti-virus definitions... "
     /usr/bin/freshclam >> $LOG &
     /usr/bin/freshclam >> $LOG &
     BACK_PID=$!
     BACK_PID=$!
     spin_i=1
     spin_i=1
@@ -1605,7 +1605,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$spamd" = 'yes' ]; then
 if [ "$spamd" = 'yes' ]; then
-    echo "(*) Configuring SpamAssassin..."
+    echo "[ * ] Configuring SpamAssassin..."
     update-rc.d spamassassin defaults > /dev/null 2>&1
     update-rc.d spamassassin defaults > /dev/null 2>&1
     sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
     sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
     systemctl start spamassassin >> $LOG
     systemctl start spamassassin >> $LOG
@@ -1622,7 +1622,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
 if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
-    echo "(*) Configuring Roundcube webmail client..."
+    echo "[ * ] Configuring Roundcube webmail client..."
     cp -f $HESTIA_INSTALL_DIR/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $HESTIA_INSTALL_DIR/roundcube/config.inc.php /etc/roundcube/plugins/password/
     cp -f $HESTIA_INSTALL_DIR/roundcube/config.inc.php /etc/roundcube/plugins/password/
@@ -1681,7 +1681,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$fail2ban" = 'yes' ]; then
 if [ "$fail2ban" = 'yes' ]; then
-    echo "(*) Configuring fail2ban access monitor..."
+    echo "[ * ] Configuring fail2ban access monitor..."
     cp -rf $HESTIA_INSTALL_DIR/fail2ban /etc/
     cp -rf $HESTIA_INSTALL_DIR/fail2ban /etc/
     if [ "$dovecot" = 'no' ]; then
     if [ "$dovecot" = 'no' ]; then
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
@@ -1852,7 +1852,7 @@ command="sudo $HESTIA/bin/v-update-sys-rrd"
 $HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
 $HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
 
 
 # Enable automatic updates
 # Enable automatic updates
-$HESTIA/bin/v-add-cron-hestia-autoupdate
+$HESTIA/bin/v-add-cron-hestia-autoupdate apt
 
 
 # Building initital rrd images
 # Building initital rrd images
 $HESTIA/bin/v-update-sys-rrd
 $HESTIA/bin/v-update-sys-rrd
@@ -1869,7 +1869,7 @@ $HESTIA/bin/v-change-sys-port $port > /dev/null 2>&1
 $HESTIA/bin/v-change-sys-theme 'default'
 $HESTIA/bin/v-change-sys-theme 'default'
 
 
 # Update remaining packages since repositories have changed
 # Update remaining packages since repositories have changed
-echo -ne "(*) Installing remaining software updates..."
+echo -ne "[ * ] Installing remaining software updates..."
 apt-get -qq update
 apt-get -qq update
 apt-get -y upgrade >> $LOG &
 apt-get -y upgrade >> $LOG &
 BACK_PID=$!
 BACK_PID=$!
@@ -1886,8 +1886,8 @@ chown admin:admin $HESTIA/data/sessions
 #                  Configure File Manager                   #
 #                  Configure File Manager                   #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-echo "(*) Configuring File Manager..."
-source $HESTIA_INSTALL_DIR/filemanager/install-fm.sh > /dev/null 2>&1
+echo "[ * ] Configuring File Manager..."
+$HESTIA/bin/v-add-sys-filemanager quiet
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -1949,7 +1949,7 @@ rm -f $tmpfile
 # Add welcome message to notification panel
 # Add welcome message to notification panel
 $HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a> or e-mail <a href="mailto:info@hestiacp.com?Subject="['$new_version'] Bug Report: ">info@hestiacp.com</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
 $HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a> or e-mail <a href="mailto:info@hestiacp.com?Subject="['$new_version'] Bug Report: ">info@hestiacp.com</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
 
 
-echo "(!) IMPORTANT: You must logout or restart the server before continuing."
+echo "[ ! ] IMPORTANT: You must logout or restart the server before continuing."
 echo ""
 echo ""
 if [ "$interactive" = 'yes' ]; then
 if [ "$interactive" = 'yes' ]; then
     echo -n " Do you want to reboot now? [Y/N] "
     echo -n " Do you want to reboot now? [Y/N] "

+ 25 - 20
install/upgrade/versions/latest.sh

@@ -53,7 +53,7 @@ fi
 
 
 # Add sury apache2 repository
 # Add sury apache2 repository
 if [ "$WEB_SYSTEM" = "apache2" ] && [ ! -e "/etc/apt/sources.list.d/apache2.list" ]; then
 if [ "$WEB_SYSTEM" = "apache2" ] && [ ! -e "/etc/apt/sources.list.d/apache2.list" ]; then
-    echo "(*) Configuring sury.org Apache2 repository..."
+    echo "[ * ] Configuring sury.org Apache2 repository..."
 
 
     # Check OS and install related repository
     # Check OS and install related repository
     if [ -e "/etc/os-release" ]; then
     if [ -e "/etc/os-release" ]; then
@@ -72,7 +72,7 @@ fi
 
 
 # Roundcube fixes for PHP 7.4 compatibility
 # Roundcube fixes for PHP 7.4 compatibility
 if [ -d /usr/share/roundcube ]; then
 if [ -d /usr/share/roundcube ]; then
-    echo "(*) Updating Roundcube configuration..."
+    echo "[ * ] Updating Roundcube configuration..."
     [ -f "/usr/share/roundcube/plugins/enigma/lib/enigma_ui.php" ] && sed -i 's/$identities, "\\n"/"\\n", $identities/g' /usr/share/roundcube/plugins/enigma/lib/enigma_ui.php
     [ -f "/usr/share/roundcube/plugins/enigma/lib/enigma_ui.php" ] && sed -i 's/$identities, "\\n"/"\\n", $identities/g' /usr/share/roundcube/plugins/enigma/lib/enigma_ui.php
     [ -f "/usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php" ] && sed -i 's/(array_keys($post_search), \x27|\x27)/(\x27|\x27, array_keys($post_search))/g' /usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php
     [ -f "/usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php" ] && sed -i 's/(array_keys($post_search), \x27|\x27)/(\x27|\x27, array_keys($post_search))/g' /usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php
     [ -f "/usr/share/roundcube/program/lib/Roundcube/rcube_db.php" ] && sed -i 's/implode($name, \x27.\x27)/implode(\x27.\x27, $name)/g' /usr/share/roundcube/program/lib/Roundcube/rcube_db.php
     [ -f "/usr/share/roundcube/program/lib/Roundcube/rcube_db.php" ] && sed -i 's/implode($name, \x27.\x27)/implode(\x27.\x27, $name)/g' /usr/share/roundcube/program/lib/Roundcube/rcube_db.php
@@ -90,13 +90,13 @@ fi
 
 
 # HELO support for multiple domains and IPs
 # HELO support for multiple domains and IPs
 if [ -e "/etc/exim4/exim4.conf.template" ]; then
 if [ -e "/etc/exim4/exim4.conf.template" ]; then
-    echo "(*) Updating exim4 configuration..."
+    echo "[ * ] Updating exim4 configuration..."
     sed -i 's|helo_data = ${primary_hostname}|helo_data = ${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{$sender_address_domain}lsearch*{\/etc\/exim4\/mailhelo.conf}{$value}{$primary_hostname}}}{$primary_hostname}}|g' /etc/exim4/exim4.conf.template
     sed -i 's|helo_data = ${primary_hostname}|helo_data = ${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{$sender_address_domain}lsearch*{\/etc\/exim4\/mailhelo.conf}{$value}{$primary_hostname}}}{$primary_hostname}}|g' /etc/exim4/exim4.conf.template
 fi
 fi
 
 
 # Add daily midnight cron
 # Add daily midnight cron
 if [ -z "$($BIN/v-list-cron-jobs admin | grep 'v-update-sys-queue daily')" ]; then
 if [ -z "$($BIN/v-list-cron-jobs admin | grep 'v-update-sys-queue daily')" ]; then
-    echo "(*) Updating cron jobs..."
+    echo "[ * ] Updating cron jobs..."
     command="sudo $BIN/v-update-sys-queue daily"
     command="sudo $BIN/v-update-sys-queue daily"
     $BIN/v-add-cron-job 'admin' '01' '00' '*' '*' '*' "$command"
     $BIN/v-add-cron-job 'admin' '01' '00' '*' '*' '*' "$command"
 fi
 fi
@@ -115,7 +115,7 @@ fi
 
 
 # Add hestia-event.conf, if the server is running apache2
 # Add hestia-event.conf, if the server is running apache2
 if [ "$WEB_SYSTEM" = "apache2" ]; then
 if [ "$WEB_SYSTEM" = "apache2" ]; then
-    echo "(*) Updating Apache2 configuration..."
+    echo "[ * ] Updating Apache2 configuration..."
     # Cleanup
     # Cleanup
     rm --force /etc/apache2/mods-available/hestia-event.conf
     rm --force /etc/apache2/mods-available/hestia-event.conf
     rm --force /etc/apache2/mods-enabled/hestia-event.conf
     rm --force /etc/apache2/mods-enabled/hestia-event.conf
@@ -134,20 +134,26 @@ if [ "$WEB_SYSTEM" = "apache2" ]; then
     rm --force /etc/apache2/mods-enabled/status.conf # a2dismod will not remove the file if it isn't a symlink
     rm --force /etc/apache2/mods-enabled/status.conf # a2dismod will not remove the file if it isn't a symlink
 fi
 fi
 
 
-# Install Filegator FileManager during upgrade
-if [ ! -e "$HESTIA/web/fm/configuration.php" ]; then
-    echo "(*) Configuring File Manager..."
-    # Install the FileManager
-    source $HESTIA_INSTALL_DIR/filemanager/install-fm.sh > /dev/null 2>&1
-else 
-    echo "(*) Updating File Manager configuration..."
-    # Update configuration.php
-    cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
+# Install File Manager during upgrade if environment variable oesn't already exist and isn't set to false
+# so that we don't override preference
+FILE_MANAGER_CHECK=$(cat $HESTIA/conf/hestia.conf | grep "FILE_MANAGER='false'")
+if [ -z "$FILE_MANAGER_CHECK" ]; then
+    if [ ! -e "$HESTIA/web/fm/configuration.php" ]; then
+        echo "[ ! ] Installing File Manager..."
+        # Install the File Manager
+        $HESTIA/bin/v-add-sys-filemanager quiet
+    else 
+        echo "[ * ] Updating File Manager configuration..."
+        # Update configuration.php
+        cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
+        # Set environment variable for interface
+        $HESTIA/bin/v-change-sys-config-value 'FILE_MANAGER' 'true'
+    fi
 fi
 fi
 
 
 # Enable nginx module loading
 # Enable nginx module loading
 if [ -f "/etc/nginx/nginx.conf" ]; then
 if [ -f "/etc/nginx/nginx.conf" ]; then
-    echo "(*) Updating NGINX configuration..."
+    echo "[ * ] Updating NGINX configuration..."
     if [ ! -d "/etc/nginx/modules-enabled" ]; then
     if [ ! -d "/etc/nginx/modules-enabled" ]; then
         mkdir -p "/etc/nginx/modules-enabled"
         mkdir -p "/etc/nginx/modules-enabled"
     fi
     fi
@@ -158,7 +164,7 @@ if [ -f "/etc/nginx/nginx.conf" ]; then
 fi
 fi
 
 
 # Fix public_(s)html group ownership
 # Fix public_(s)html group ownership
-echo "(*) Updating public_(s)html ownership..."
+echo "[ * ] Updating public_(s)html ownership..."
 for user in $($HESTIA/bin/v-list-sys-users plain); do
 for user in $($HESTIA/bin/v-list-sys-users plain); do
     # skip users with missing home folder
     # skip users with missing home folder
     [[ -d /home/${user}/ ]] || continue
     [[ -d /home/${user}/ ]] || continue
@@ -171,7 +177,7 @@ done
 
 
 # Fix phpMyAdmin blowfish_secret error message due to incorrect permissions
 # Fix phpMyAdmin blowfish_secret error message due to incorrect permissions
 if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
 if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
-    echo "(*) Updating phpMyAdmin permissions..."
+    echo "[ * ] Updating phpMyAdmin permissions..."
     chmod 0644 /var/lib/phpmyadmin/blowfish_secret.inc.php
     chmod 0644 /var/lib/phpmyadmin/blowfish_secret.inc.php
 fi
 fi
 
 
@@ -179,7 +185,7 @@ fi
 if [ -e "/var/lib/phpmyadmin" ]; then
 if [ -e "/var/lib/phpmyadmin" ]; then
 PMA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PMA_ALIAS)
 PMA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PMA_ALIAS)
     if [ -z "$PMA_ALIAS_CHECK" ]; then
     if [ -z "$PMA_ALIAS_CHECK" ]; then
-        echo "(*) Updating phpMyAdmin alias..."
+        echo "[ * ] Updating phpMyAdmin alias..."
         $HESTIA/bin/v-change-sys-db-alias "pma" "phpmyadmin"
         $HESTIA/bin/v-change-sys-db-alias "pma" "phpmyadmin"
     fi
     fi
 fi
 fi
@@ -187,8 +193,7 @@ fi
 if [ -e "/var/lib/phppgadmin" ]; then
 if [ -e "/var/lib/phppgadmin" ]; then
 PGA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PGA_ALIAS)
 PGA_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep DB_PGA_ALIAS)
     if [ -z "$PGA_ALIAS_CHECK" ]; then
     if [ -z "$PGA_ALIAS_CHECK" ]; then
-        echo "(*) Updating phpPgAdmin alias..."
+        echo "[ * ] Updating phpPgAdmin alias..."
         $HESTIA/bin/v-change-sys-db-alias "pga" "phppgadmin"
         $HESTIA/bin/v-change-sys-db-alias "pga" "phppgadmin"
     fi
     fi
 fi
 fi
-

+ 2 - 2
install/upgrade/versions/previous/1.0.1.sh

@@ -8,13 +8,13 @@
 
 
 # Ensure that users from previous releases are set to the correct stable release branch
 # Ensure that users from previous releases are set to the correct stable release branch
 if [ ! -z "$RELEASE_BRANCH" ] && [ "$RELEASE_BRANCH" = "master" ] || [ "$RELEASE_BRANCH" = "develop" ]; then
 if [ ! -z "$RELEASE_BRANCH" ] && [ "$RELEASE_BRANCH" = "master" ] || [ "$RELEASE_BRANCH" = "develop" ]; then
-    echo "(*) Updating default release branch configuration..."
+    echo "[ * ] Updating default release branch configuration..."
     $HESTIA/bin/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
     $HESTIA/bin/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
 fi
 fi
 
 
 # Back up old template files and install the latest versions
 # Back up old template files and install the latest versions
 if [ -d $HESTIA/data/templates/ ]; then
 if [ -d $HESTIA/data/templates/ ]; then
-    echo "(*) Updating web templates to enable per-domain HSTS/OCSP SSL support..."
+    echo "[ * ] Updating web templates to enable per-domain HSTS/OCSP SSL support..."
     cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
     cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
     $HESTIA/bin/v-update-web-templates >/dev/null 2>&1
     $HESTIA/bin/v-update-web-templates >/dev/null 2>&1
 fi
 fi

+ 8 - 8
install/upgrade/versions/previous/1.0.2.sh

@@ -7,7 +7,7 @@
 #######################################################################################
 #######################################################################################
 
 
 # Replace dhparam 1024 with dhparam 4096
 # Replace dhparam 1024 with dhparam 4096
-echo "(*) Increasing Diffie-Hellman Parameter strength to 4096-bit..."
+echo "[ * ] Increasing Diffie-Hellman Parameter strength to 4096-bit..."
 if [ -e /etc/ssl/dhparam.pem ]; then
 if [ -e /etc/ssl/dhparam.pem ]; then
     mv /etc/ssl/dhparam.pem $HESTIA_BACKUP/conf/
     mv /etc/ssl/dhparam.pem $HESTIA_BACKUP/conf/
 fi
 fi
@@ -16,20 +16,20 @@ chmod 600 /etc/ssl/dhparam.pem
 
 
 # Enhance Vsftpd security
 # Enhance Vsftpd security
 if [ "$FTP_SYSTEM" = "vsftpd" ]; then
 if [ "$FTP_SYSTEM" = "vsftpd" ]; then
-    echo "(*) Hardening Vsftpd SSL configuration..."
+    echo "[ * ] Hardening Vsftpd SSL configuration..."
     cp -f /etc/vsftpd.conf $HESTIA_BACKUP/conf/
     cp -f /etc/vsftpd.conf $HESTIA_BACKUP/conf/
     sed -i "s|ssl_tlsv1=YES|ssl_tlsv1=NO|g" /etc/vsftpd.conf
     sed -i "s|ssl_tlsv1=YES|ssl_tlsv1=NO|g" /etc/vsftpd.conf
 fi
 fi
 
 
 # Enhance Dovecot security
 # Enhance Dovecot security
 if [ "$IMAP_SYSTEM" = "dovecot" ]; then
 if [ "$IMAP_SYSTEM" = "dovecot" ]; then
-    echo "(*) Hardening Dovecot SSL configuration..."
+    echo "[ * ] Hardening Dovecot SSL configuration..."
     mv /etc/dovecot/conf.d/10-ssl.conf $HESTIA_BACKUP/conf/
     mv /etc/dovecot/conf.d/10-ssl.conf $HESTIA_BACKUP/conf/
     cp -f $HESTIA/install/deb/dovecot/conf.d/10-ssl.conf /etc/dovecot/conf.d/
     cp -f $HESTIA/install/deb/dovecot/conf.d/10-ssl.conf /etc/dovecot/conf.d/
 fi
 fi
 
 
 # Update DNS resolvers in hestia-nginx's configuration
 # Update DNS resolvers in hestia-nginx's configuration
-echo "(*) Updating DNS resolvers for Hestia Internal Web Server..."
+echo "[ * ] Updating DNS resolvers for Hestia Internal Web Server..."
 dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
 dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
 for ip in $dns_resolver; do
 for ip in $dns_resolver; do
     if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
     if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
@@ -43,7 +43,7 @@ fi
 # Remove Webalizer and set AWStats as default
 # Remove Webalizer and set AWStats as default
 WEBALIZER_CHECK=$(cat $HESTIA/conf/hestia.conf | grep webalizer)
 WEBALIZER_CHECK=$(cat $HESTIA/conf/hestia.conf | grep webalizer)
 if [ ! -z "$WEBALIZER_CHECK" ]; then
 if [ ! -z "$WEBALIZER_CHECK" ]; then
-    echo "(*) Removing Webalizer and setting AWStats as default web statistics backend..."
+    echo "[ * ] Removing Webalizer and setting AWStats as default web statistics backend..."
     apt purge webalizer -y > /dev/null 2>&1
     apt purge webalizer -y > /dev/null 2>&1
     if [ -d "$HESTIA/data/templates/web/webalizer" ]; then
     if [ -d "$HESTIA/data/templates/web/webalizer" ]; then
         rm -rf $HESTIA/data/templates/web/webalizer
         rm -rf $HESTIA/data/templates/web/webalizer
@@ -56,17 +56,17 @@ fi
 
 
 # Remove old hestia.conf files from Apache & NGINX if they exist
 # Remove old hestia.conf files from Apache & NGINX if they exist
 if [ -f "/etc/apache2/conf.d/hestia.conf" ]; then
 if [ -f "/etc/apache2/conf.d/hestia.conf" ]; then
-    echo "(*) Removing old Apache configuration file from previous version of Hestia Control Panel..."
+    echo "[ * ] Removing old Apache configuration file from previous version of Hestia Control Panel..."
     rm -f /etc/apache2/conf.d/hestia.conf
     rm -f /etc/apache2/conf.d/hestia.conf
 fi
 fi
 if [ -f "/etc/nginx/conf.d/hestia.conf" ]; then
 if [ -f "/etc/nginx/conf.d/hestia.conf" ]; then
-    echo "(*) Removing old NGINX configuration file from previous version of Hestia Control Panel..."
+    echo "[ * ] Removing old NGINX configuration file from previous version of Hestia Control Panel..."
     rm -f /etc/nginx/conf.d/hestia.conf
     rm -f /etc/nginx/conf.d/hestia.conf
 fi
 fi
 
 
 # Update webmail templates to enable OCSP/SSL stapling
 # Update webmail templates to enable OCSP/SSL stapling
 if [ ! -z "$IMAP_SYSTEM" ]; then
 if [ ! -z "$IMAP_SYSTEM" ]; then
-    echo "(*) Enabling OCSP stapling support for webmail services..."
+    echo "[ * ] Enabling OCSP stapling support for webmail services..."
     $BIN/v-update-mail-templates > /dev/null 2>&1
     $BIN/v-update-mail-templates > /dev/null 2>&1
 fi 
 fi 
 
 

+ 1 - 1
install/upgrade/versions/previous/1.0.4.sh

@@ -9,7 +9,7 @@
 # Add php-imagick package to existing version...
 # Add php-imagick package to existing version...
 php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null |wc -l)
 php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null |wc -l)
 if [ "$php_versions" -gt 1 ]; then
 if [ "$php_versions" -gt 1 ]; then
-    echo "(*) Install PHP Imageqick..."
+    echo "[ * ] Install PHP Imageqick..."
     software="php-imagick"
     software="php-imagick"
     for v in $(ls /etc/php/); do
     for v in $(ls /etc/php/); do
         if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
         if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then

+ 18 - 18
install/upgrade/versions/previous/1.00.0-190618.sh

@@ -8,25 +8,25 @@
 
 
 # Add webmail alias variable to system configuration if non-existent
 # Add webmail alias variable to system configuration if non-existent
 if [ -z "$WEBMAIL_ALIAS" ]; then
 if [ -z "$WEBMAIL_ALIAS" ]; then
-    echo "(*) Updating webmail alias configuration..."
+    echo "[ * ] Updating webmail alias configuration..."
     $HESTIA/bin/v-change-sys-config-value 'WEBMAIL_ALIAS' "webmail"
     $HESTIA/bin/v-change-sys-config-value 'WEBMAIL_ALIAS' "webmail"
 fi
 fi
 
 
 # Update Apache and Nginx configuration to support new file structure
 # Update Apache and Nginx configuration to support new file structure
 if [ -f /etc/apache2/apache.conf ]; then
 if [ -f /etc/apache2/apache.conf ]; then
-    echo "(*) Updating Apache configuration..."
+    echo "[ * ] Updating Apache configuration..."
     mv  /etc/apache2/apache.conf $HESTIA_BACKUP/conf/
     mv  /etc/apache2/apache.conf $HESTIA_BACKUP/conf/
     cp -f $HESTIA_INSTALL_DIR/apache2/apache.conf /etc/apache2/apache.conf
     cp -f $HESTIA_INSTALL_DIR/apache2/apache.conf /etc/apache2/apache.conf
 fi
 fi
 if [ -f /etc/nginx/nginx.conf ]; then
 if [ -f /etc/nginx/nginx.conf ]; then
-    echo "(*) Updating NGINX configuration..."
+    echo "[ * ] Updating NGINX configuration..."
     mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
     mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/nginx.conf
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/nginx.conf
 fi
 fi
 
 
 # Generate dhparam
 # Generate dhparam
 if [ ! -e /etc/ssl/dhparam.pem ]; then
 if [ ! -e /etc/ssl/dhparam.pem ]; then
-    echo "(*) Enabling HTTPS Strict Transport Security (HSTS) support..."
+    echo "[ * ] Enabling HTTPS Strict Transport Security (HSTS) support..."
     mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
     mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
     cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
 
 
@@ -40,13 +40,13 @@ fi
 
 
 # Back up default package and install latest version
 # Back up default package and install latest version
 if [ -d $HESTIA/data/packages/ ]; then
 if [ -d $HESTIA/data/packages/ ]; then
-    echo "(*) Replacing default packages..."
+    echo "[ * ] Replacing default packages..."
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
 fi
 fi
 
 
 # Back up old template files and install the latest versions
 # Back up old template files and install the latest versions
 if [ -d $HESTIA/data/templates/ ]; then
 if [ -d $HESTIA/data/templates/ ]; then
-    echo "(*) Replacing default Web, DNS, and Mail templates..."
+    echo "[ * ] Replacing default Web, DNS, and Mail templates..."
     cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
     cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
     $HESTIA/bin/v-update-web-templates >/dev/null 2>&1
     $HESTIA/bin/v-update-web-templates >/dev/null 2>&1
     $HESTIA/bin/v-update-dns-templates >/dev/null 2>&1
     $HESTIA/bin/v-update-dns-templates >/dev/null 2>&1
@@ -105,7 +105,7 @@ if [ -d "/etc/roundcube" ]; then
 fi
 fi
 
 
 # Add a general group for normal users created by Hestia
 # Add a general group for normal users created by Hestia
-echo "(*) Verifying ACLs and hardening user permissions..."
+echo "[ * ] Verifying ACLs and hardening user permissions..."
 if [ -z "$(grep ^hestia-users: /etc/group)" ]; then
 if [ -z "$(grep ^hestia-users: /etc/group)" ]; then
     groupadd --system "hestia-users"
     groupadd --system "hestia-users"
 fi
 fi
@@ -132,7 +132,7 @@ for ipaddr in $(ls /usr/local/hestia/data/ips/ 2>/dev/null); do
     rm -f $web_conf
     rm -f $web_conf
 
 
     if [ "$WEB_SYSTEM" = "apache2" ]; then
     if [ "$WEB_SYSTEM" = "apache2" ]; then
-        echo "(*) Adding unassigned hosts configuration to Apache..."
+        echo "[ * ] Adding unassigned hosts configuration to Apache..."
         if [ -z "$(/usr/sbin/apache2 -v | grep Apache/2.4)" ]; then
         if [ -z "$(/usr/sbin/apache2 -v | grep Apache/2.4)" ]; then
             echo "NameVirtualHost $ipaddr:$WEB_PORT" >  $web_conf
             echo "NameVirtualHost $ipaddr:$WEB_PORT" >  $web_conf
         fi
         fi
@@ -155,7 +155,7 @@ for ipaddr in $(ls /usr/local/hestia/data/ips/ 2>/dev/null); do
     fi
     fi
 
 
     if [ "$PROXY_SYSTEM" = "nginx" ]; then
     if [ "$PROXY_SYSTEM" = "nginx" ]; then
-        echo "(*) Adding unassigned hosts configuration to Nginx..."
+        echo "[ * ] Adding unassigned hosts configuration to Nginx..."
         cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
         cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
         sed -e "s/%ip%/$ipaddr/g" \
         sed -e "s/%ip%/$ipaddr/g" \
             -e "s/%web_port%/$WEB_PORT/g" \
             -e "s/%web_port%/$WEB_PORT/g" \
@@ -175,7 +175,7 @@ chmod 755 /etc/cron.daily/php-session-cleanup
 # Fix empty pool error message for MultiPHP
 # Fix empty pool error message for MultiPHP
 php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null |wc -l)
 php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null |wc -l)
 if [ "$php_versions" -gt 1 ]; then
 if [ "$php_versions" -gt 1 ]; then
-    echo "(*) Updating Multi-PHP configuration..."
+    echo "[ * ] Updating Multi-PHP configuration..."
     for v in $(ls /etc/php/); do
     for v in $(ls /etc/php/); do
         if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
         if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
             continue
             continue
@@ -187,7 +187,7 @@ if [ "$php_versions" -gt 1 ]; then
 fi
 fi
 
 
 # Set Purge to false in Roundcube configuration - https://goo.gl/3Nja3u
 # Set Purge to false in Roundcube configuration - https://goo.gl/3Nja3u
-echo "(*) Updating Roundcube configuration..."
+echo "[ * ] Updating Roundcube configuration..."
 if [ -f /etc/roundcube/config.inc.php ]; then
 if [ -f /etc/roundcube/config.inc.php ]; then
     sed -i "s/\['flag_for_deletion'] = 'Purge';/\['flag_for_deletion'] = false;/gI" /etc/roundcube/config.inc.php
     sed -i "s/\['flag_for_deletion'] = 'Purge';/\['flag_for_deletion'] = false;/gI" /etc/roundcube/config.inc.php
 fi
 fi
@@ -200,16 +200,16 @@ fi
 
 
 # Remove old OS-specific installation files if they exist to free up space
 # Remove old OS-specific installation files if they exist to free up space
 if [ -d $HESTIA/install/ubuntu ]; then
 if [ -d $HESTIA/install/ubuntu ]; then
-    echo "(*) Removing old HestiaCP installation files for Ubuntu..."
+    echo "[ * ] Removing old HestiaCP installation files for Ubuntu..."
     rm -rf $HESTIA/install/ubuntu
     rm -rf $HESTIA/install/ubuntu
 fi
 fi
 if [ -d $HESTIA/install/debian ]; then
 if [ -d $HESTIA/install/debian ]; then
-    echo "(*) Removing old HestiaCP installation files for Debian..."
+    echo "[ * ] Removing old HestiaCP installation files for Debian..."
     rm -rf $HESTIA/install/debian
     rm -rf $HESTIA/install/debian
 fi
 fi
 
 
 # Fix Dovecot configuration
 # Fix Dovecot configuration
-echo "(*) Updating Dovecot IMAP/POP server configuration..."
+echo "[ * ] Updating Dovecot IMAP/POP server configuration..."
 if [ -f /etc/dovecot/conf.d/15-mailboxes.conf ]; then
 if [ -f /etc/dovecot/conf.d/15-mailboxes.conf ]; then
     mv  /etc/dovecot/conf.d/15-mailboxes.conf $HESTIA_BACKUP/conf/
     mv  /etc/dovecot/conf.d/15-mailboxes.conf $HESTIA_BACKUP/conf/
 fi
 fi
@@ -223,7 +223,7 @@ fi
 
 
 # Fix Exim configuration
 # Fix Exim configuration
 if [ -f /etc/exim4/exim4.conf.template ]; then
 if [ -f /etc/exim4/exim4.conf.template ]; then
-    echo "(*) Updating Exim SMTP server configuration..."
+    echo "[ * ] Updating Exim SMTP server configuration..."
     mv  /etc/exim4/exim4.conf.template $HESTIA_BACKUP/conf/
     mv  /etc/exim4/exim4.conf.template $HESTIA_BACKUP/conf/
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/exim4.conf.template
     cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/exim4.conf.template
     # Reconfigure spam filter and virus scanning
     # Reconfigure spam filter and virus scanning
@@ -239,7 +239,7 @@ fi
 # Add IMAP system variable to configuration if Dovecot is installed
 # Add IMAP system variable to configuration if Dovecot is installed
 if [ -z "$IMAP_SYSTEM" ]; then
 if [ -z "$IMAP_SYSTEM" ]; then
     if [ -f /usr/bin/dovecot ]; then
     if [ -f /usr/bin/dovecot ]; then
-        echo "(*) Adding missing IMAP_SYSTEM variable to hestia.conf..."
+        echo "[ * ] Adding missing IMAP_SYSTEM variable to hestia.conf..."
         echo "IMAP_SYSTEM = 'dovecot'" >> $HESTIA/conf/hestia.conf
         echo "IMAP_SYSTEM = 'dovecot'" >> $HESTIA/conf/hestia.conf
     fi
     fi
 fi
 fi
@@ -250,7 +250,7 @@ $HESTIA/bin/v-add-sys-sftp-jail
 # Enable SFTP subsystem for SSH
 # Enable SFTP subsystem for SSH
 sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
 sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
 if [ ! -z "$sftp_subsys_enabled" ]; then
 if [ ! -z "$sftp_subsys_enabled" ]; then
-    echo "(*) Updating SFTP subsystem configuration..."
+    echo "[ * ] Updating SFTP subsystem configuration..."
     sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
     sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
     systemctl restart ssh
     systemctl restart ssh
 fi
 fi
@@ -263,7 +263,7 @@ for user in `ls /usr/local/hestia/data/users/`; do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
         obskey=$(get_object_value 'web' 'DOMAIN' "$domain" '$FORCESSL')
         obskey=$(get_object_value 'web' 'DOMAIN' "$domain" '$FORCESSL')
         if [ ! -z "$obskey" ]; then
         if [ ! -z "$obskey" ]; then
-            echo "(*) Fixing HTTP-to-HTTPS redirection for $domain"
+            echo "[ * ] Fixing HTTP-to-HTTPS redirection for $domain"
             update_object_value 'web' 'DOMAIN' "$domain" '$FORCESSL' ''
             update_object_value 'web' 'DOMAIN' "$domain" '$FORCESSL' ''
 
 
             # copy value under new key name
             # copy value under new key name

+ 13 - 13
install/upgrade/versions/previous/1.1.0.sh

@@ -8,13 +8,13 @@
 
 
 # Set default theme
 # Set default theme
 if [ -z $THEME ]; then
 if [ -z $THEME ]; then
-    echo "(*) Enabling support for themes..."
+    echo "[ * ] Enabling support for themes..."
     $BIN/v-change-sys-theme 'default'
     $BIN/v-change-sys-theme 'default'
 fi
 fi
 
 
 # Reduce SSH login grace time
 # Reduce SSH login grace time
 if [ -e /etc/ssh/sshd_config ]; then
 if [ -e /etc/ssh/sshd_config ]; then
-    echo "(*) Hardening SSH daemon configuration..."
+    echo "[ * ] Hardening SSH daemon configuration..."
     sed -i "s/LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
     sed -i "s/LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
     sed -i "s/#LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
     sed -i "s/#LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
 fi
 fi
@@ -28,7 +28,7 @@ fi
 
 
 # Enable OCSP SSL stapling and harden nginx configuration for roundcube
 # Enable OCSP SSL stapling and harden nginx configuration for roundcube
 if [ ! -z "$IMAP_SYSTEM" ]; then
 if [ ! -z "$IMAP_SYSTEM" ]; then
-    echo "(*) Hardening security of Roundcube webmail..."
+    echo "[ * ] Hardening security of Roundcube webmail..."
     $BIN/v-update-mail-templates > /dev/null 2>&1
     $BIN/v-update-mail-templates > /dev/null 2>&1
     if [ -e /etc/nginx/conf.d/webmail.inc ]; then
     if [ -e /etc/nginx/conf.d/webmail.inc ]; then
         cp -f /etc/nginx/conf.d/webmail.inc $HESTIA_BACKUP/conf/
         cp -f /etc/nginx/conf.d/webmail.inc $HESTIA_BACKUP/conf/
@@ -46,7 +46,7 @@ fi
 if [ -e "/etc/clamav/clamd.conf" ]; then
 if [ -e "/etc/clamav/clamd.conf" ]; then
     clamd_conf_update_check=$(grep DetectBrokenExecutables /etc/clamav/clamd.conf)
     clamd_conf_update_check=$(grep DetectBrokenExecutables /etc/clamav/clamd.conf)
     if [ ! -z "$clamd_conf_update_check" ]; then
     if [ ! -z "$clamd_conf_update_check" ]; then
-        echo "(*) Updating ClamAV configuration..."
+        echo "[ * ] Updating ClamAV configuration..."
         sed -i '/DetectBrokenExecutables/d' /etc/clamav/clamd.conf
         sed -i '/DetectBrokenExecutables/d' /etc/clamav/clamd.conf
     fi
     fi
 fi
 fi
@@ -58,7 +58,7 @@ fi
 
 
 # Use exim4 server hostname instead of mail domain and remove hardcoded mail prefix
 # Use exim4 server hostname instead of mail domain and remove hardcoded mail prefix
 if [ ! -z "$MAIL_SYSTEM" ]; then
 if [ ! -z "$MAIL_SYSTEM" ]; then
-    echo "(*) Updating exim configuration..."
+    echo "[ * ] Updating exim configuration..."
     if cat /etc/exim4/exim4.conf.template | grep -q 'helo_data = mail.${sender_address_domain}'; then
     if cat /etc/exim4/exim4.conf.template | grep -q 'helo_data = mail.${sender_address_domain}'; then
         sed -i 's/helo_data = mail.${sender_address_domain}/helo_data = ${primary_hostname}/g' /etc/exim4/exim4.conf.template
         sed -i 's/helo_data = mail.${sender_address_domain}/helo_data = ${primary_hostname}/g' /etc/exim4/exim4.conf.template
     fi
     fi
@@ -85,7 +85,7 @@ if [ -e "/etc/cron.d/hestia-sftp" ]; then
 fi
 fi
 
 
 # Create default writeable folders for all users
 # Create default writeable folders for all users
-echo "(*) Updating default writable folders for all users..."
+echo "[ * ] Updating default writable folders for all users..."
 for user in $($HESTIA/bin/v-list-sys-users plain); do
 for user in $($HESTIA/bin/v-list-sys-users plain); do
     mkdir -p \
     mkdir -p \
         $HOMEDIR/$user/.cache \
         $HOMEDIR/$user/.cache \
@@ -113,14 +113,14 @@ fi
 
 
 # Update Office 365/Microsoft 365 DNS template
 # Update Office 365/Microsoft 365 DNS template
 if [ -e "$HESTIA/data/templates/dns/office365.tpl" ]; then
 if [ -e "$HESTIA/data/templates/dns/office365.tpl" ]; then
-    echo "(*) Updating DNS template for Office 365..."
+    echo "[ * ] Updating DNS template for Office 365..."
     cp -f $HESTIA/install/deb/templates/dns/office365.tpl $HESTIA/data/templates/dns/office365.tpl
     cp -f $HESTIA/install/deb/templates/dns/office365.tpl $HESTIA/data/templates/dns/office365.tpl
 fi
 fi
 
 
 # Ensure that backup compression level is correctly set
 # Ensure that backup compression level is correctly set
 GZIP_LVL_CHECK=$(cat $HESTIA/conf/hestia.conf | grep BACKUP_GZIP)
 GZIP_LVL_CHECK=$(cat $HESTIA/conf/hestia.conf | grep BACKUP_GZIP)
 if [ -z "$GZIP_LVL_CHECK" ]; then
 if [ -z "$GZIP_LVL_CHECK" ]; then
-    echo "(*) Updating backup compression level variable..."
+    echo "[ * ] Updating backup compression level variable..."
     $BIN/v-change-sys-config-value "BACKUP_GZIP" '9'
     $BIN/v-change-sys-config-value "BACKUP_GZIP" '9'
 fi
 fi
 
 
@@ -140,7 +140,7 @@ fi
 
 
 # Installing postgresql repo
 # Installing postgresql repo
 if [ -e "/etc/postgresql" ]; then
 if [ -e "/etc/postgresql" ]; then
-    echo "(*) Enabling native PostgreSQL APT repository..."
+    echo "[ * ] Enabling native PostgreSQL APT repository..."
     osname="$(cat /etc/os-release | grep "^ID\=" | sed "s/ID\=//g")"
     osname="$(cat /etc/os-release | grep "^ID\=" | sed "s/ID\=//g")"
     if [ "$osname" = "ubuntu" ]; then
     if [ "$osname" = "ubuntu" ]; then
         codename="$(lsb_release -s -c)"
         codename="$(lsb_release -s -c)"
@@ -157,7 +157,7 @@ fi
 if [ -e "/etc/mysql/my.cnf" ]; then
 if [ -e "/etc/mysql/my.cnf" ]; then
     mysql_local_infile_check=$(grep local-infile /etc/mysql/my.cnf)
     mysql_local_infile_check=$(grep local-infile /etc/mysql/my.cnf)
     if [ -z "$mysql_local_infile_check" ]; then
     if [ -z "$mysql_local_infile_check" ]; then
-        echo "(*) Hardening MySQL configuration..."
+        echo "[ * ] Hardening MySQL configuration..."
         sed -i '/symbolic-links\=0/a\local-infile=0' /etc/mysql/my.cnf
         sed -i '/symbolic-links\=0/a\local-infile=0' /etc/mysql/my.cnf
     fi
     fi
 fi
 fi
@@ -166,7 +166,7 @@ fi
 if [ -e "/etc/nginx/nginx.conf" ]; then
 if [ -e "/etc/nginx/nginx.conf" ]; then
     nginx_tls_check=$(grep TLSv1.1 /etc/nginx/nginx.conf)
     nginx_tls_check=$(grep TLSv1.1 /etc/nginx/nginx.conf)
     if [ ! -z "$nginx_tls_check" ]; then
     if [ ! -z "$nginx_tls_check" ]; then
-        echo "(*) Updating nginx security settings - disabling TLS v1.1..."
+        echo "[ * ] Updating nginx security settings - disabling TLS v1.1..."
         sed -i 's/TLSv1.1 //g' /etc/nginx/nginx.conf
         sed -i 's/TLSv1.1 //g' /etc/nginx/nginx.conf
     fi
     fi
 fi
 fi
@@ -195,7 +195,7 @@ chown root:root /var/log/$WEB_SYSTEM/domains/$WEBMAIL_ALIAS* > /dev/null 2>&1
 
 
 # Enable IMAP/POP3 quota information
 # Enable IMAP/POP3 quota information
 if [ "$IMAP_SYSTEM" = "dovecot" ]; then
 if [ "$IMAP_SYSTEM" = "dovecot" ]; then
-    echo "(*) Enabling IMAP quota information reporting..."
+    echo "[ * ] Enabling IMAP quota information reporting..."
     if [ -e /etc/dovecot/conf.d/20-pop3.conf ]; then
     if [ -e /etc/dovecot/conf.d/20-pop3.conf ]; then
         cp -f $HESTIA/install/deb/dovecot/conf.d/20-pop3.conf /etc/dovecot/conf.d/20-pop3.conf
         cp -f $HESTIA/install/deb/dovecot/conf.d/20-pop3.conf /etc/dovecot/conf.d/20-pop3.conf
     fi
     fi
@@ -210,7 +210,7 @@ fi
 # Trigger multiphp legacy migration script
 # Trigger multiphp legacy migration script
 num_php_versions=$(ls -d /etc/php/*/fpm/pool.d 2>/dev/null |wc -l)
 num_php_versions=$(ls -d /etc/php/*/fpm/pool.d 2>/dev/null |wc -l)
 if [ "$num_php_versions" -gt 1 ] && [ -z "$WEB_BACKEND" ]; then
 if [ "$num_php_versions" -gt 1 ] && [ -z "$WEB_BACKEND" ]; then
-    echo "(*) Enabling modular Multi-PHP backend..."
+    echo "[ * ] Enabling modular Multi-PHP backend..."
     cp -rf $HESTIA/data/templates/web $HESTIA_BACKUP/templates/web
     cp -rf $HESTIA/data/templates/web $HESTIA_BACKUP/templates/web
     bash $HESTIA/install/upgrade/manual/migrate_multiphp.sh > /dev/null 2>&1
     bash $HESTIA/install/upgrade/manual/migrate_multiphp.sh > /dev/null 2>&1
 fi
 fi

+ 2 - 2
install/upgrade/versions/previous/1.1.1.sh

@@ -8,13 +8,13 @@
 
 
 # Remove 5s delay when sending mail through exim4
 # Remove 5s delay when sending mail through exim4
 if [ -e "/etc/exim4/exim4.conf.template" ]; then
 if [ -e "/etc/exim4/exim4.conf.template" ]; then
-    echo "(*) Updating exim4 configuration..."
+    echo "[ * ] Updating exim4 configuration..."
     sed -i "s|rfc1413_query_timeout = 5s|rfc1413_query_timeout = 0s|g" /etc/exim4/exim4.conf.template
     sed -i "s|rfc1413_query_timeout = 5s|rfc1413_query_timeout = 0s|g" /etc/exim4/exim4.conf.template
 fi
 fi
 
 
 # Fix phpMyAdmin blowfish and tmp directory issues
 # Fix phpMyAdmin blowfish and tmp directory issues
 if [ -e "/usr/share/phpmyadmin/libraries/vendor_config.php" ]; then
 if [ -e "/usr/share/phpmyadmin/libraries/vendor_config.php" ]; then
-    echo "(*) Updating phpMyAdmin configuration..."
+    echo "[ * ] Updating phpMyAdmin configuration..."
     sed -i "s|define('CONFIG_DIR', ROOT_PATH);|define('CONFIG_DIR', '/etc/phpmyadmin/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
     sed -i "s|define('CONFIG_DIR', ROOT_PATH);|define('CONFIG_DIR', '/etc/phpmyadmin/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
     sed -i "s|define('TEMP_DIR', ROOT_PATH . 'tmp/');|define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
     sed -i "s|define('TEMP_DIR', ROOT_PATH . 'tmp/');|define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
 fi
 fi

+ 3 - 2
web/css/src/styles.css

@@ -2849,7 +2849,7 @@ a.vst-text:active b{
 }
 }
 
 
 .hide-password {
 .hide-password {
-  color: #2361a1;
+  color: #aaa;
   margin-left: -36px;
   margin-left: -36px;
   padding-left: 3px;
   padding-left: 3px;
   z-index: 1;
   z-index: 1;
@@ -3031,8 +3031,9 @@ a.button.cancel {
   cursor: pointer;
   cursor: pointer;
   position: absolute;
   position: absolute;
   margin-left: -32px;
   margin-left: -32px;
-  margin-top: 13px;
+  margin-top: 16px;
   z-index: 1;
   z-index: 1;
+  font-size: 0.8rem;
 }
 }
 
 
 .optional {
 .optional {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
web/css/styles.min.css


BIN
web/images/toggle_password.png


BIN
web/images/unlim.png


+ 1 - 1
web/js/events.js

@@ -185,7 +185,7 @@ VE.helpers.initAdditionalPasswordFieldElements = function(ref) {
     $(ref).prop('autocomplete', 'off');
     $(ref).prop('autocomplete', 'off');
 
 
     var enabled_html = enabled ? '' : 'show-passwords-enabled-action';
     var enabled_html = enabled ? '' : 'show-passwords-enabled-action';
-    var html = '<span class="hide-password"><img class="toggle-psw-visibility-icon ' + enabled_html + '" onClick="VE.helpers.toggleHiddenPasswordText(\'' + ref + '\', this)" src="/images/toggle_password.png" /></span>';
+    var html = '<span class="hide-password"><i class="toggle-psw-visibility-icon fas fa-eye-slash ' + enabled_html + '" onClick="VE.helpers.toggleHiddenPasswordText(\'' + ref + '\', this)"></i></span>';
     $(ref).after(html);
     $(ref).after(html);
 }
 }
 
 

+ 1 - 1
web/templates/admin/add_mail_acc.html

@@ -91,7 +91,7 @@
                                     <tr>
                                     <tr>
                                         <td>
                                         <td>
                                             <input type="text" size="20" class="vst-input" name="v_quota" value="<?=htmlentities(trim($v_quota, "'"))?>">
                                             <input type="text" size="20" class="vst-input" name="v_quota" value="<?=htmlentities(trim($v_quota, "'"))?>">
-                                            <img class="unlim-trigger" id="unlim-quota" src="/images/unlim.png" />
+                                            <i class="unlim-trigger fas fa-infinity" id="unlim-quota" /</i>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                 <tr>
                                 <tr>

+ 10 - 10
web/templates/admin/add_package.html

@@ -189,7 +189,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
-                                    <img class="unlim-trigger" id="unlim-web-domains" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-web-domains"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -200,7 +200,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
-                                    <img id="unlim-web-aliases" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-web-aliases"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -211,7 +211,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
-                                    <img id="unlim-dns-domain" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-dns-domain"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -222,7 +222,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
-                                    <img id="unlim-dns-records" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-dns-records"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -233,7 +233,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
-                                    <img id="unlim-mail-domains" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-mail-domains"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -244,7 +244,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
-                                    <img id="unlim-mail-accounts" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-mail-accounts"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -255,7 +255,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
-                                    <img id="unlim-databases" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-databases"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -266,7 +266,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
-                                    <img id="unlim-cron-jobs" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-cron-jobs"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -287,7 +287,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
-                                    <img id="unlim-disk-quota" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-disk-quota"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -298,7 +298,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
-                                    <img name="unlim-bandwidth" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-bandwidth"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>

+ 1 - 1
web/templates/admin/edit_mail_acc.html

@@ -84,7 +84,7 @@
                         <tr>
                         <tr>
                           <td>
                           <td>
                                 <input type="text" size="20" class="vst-input" name="v_quota" value="<? if (!empty($v_quota)) {echo htmlentities(trim($v_quota, "'"));} else { echo "0"; } ?>">
                                 <input type="text" size="20" class="vst-input" name="v_quota" value="<? if (!empty($v_quota)) {echo htmlentities(trim($v_quota, "'"));} else { echo "0"; } ?>">
-                                <img class="unlim-trigger" id="unlim-quota" src="/images/unlim.png" />
+                                <img class="fas fa-infinity unlim-trigger" id="unlim-quota"/>
                             </td>
                             </td>
                         </tr>
                         </tr>
                         <tr>
                         <tr>

+ 10 - 10
web/templates/admin/edit_package.html

@@ -186,7 +186,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
-                                    <img class="unlim-trigger" id="unlim-web-domains" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-web-domains"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -197,7 +197,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
-                                    <img id="unlim-web-aliases" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-web-aliases"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -208,7 +208,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
-                                    <img id="unlim-dns-domain" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-dns-domain"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -219,7 +219,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
-                                    <img id="unlim-dns-records" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-dns-records"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -230,7 +230,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
-                                    <img id="unlim-mail-domains" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-mail-domains"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -241,7 +241,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
-                                    <img id="unlim-mail-accounts" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-mail-accounts"></i>
                                 <td>
                                 <td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -252,7 +252,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
-                                    <img id="unlim-databases" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-databases"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -263,7 +263,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
-                                    <img id="unlim-cron-jobs" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-cron-jobs"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -284,7 +284,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
-                                    <img id="unlim-disk-quota" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-disk-quota"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -295,7 +295,7 @@
                             <tr>
                             <tr>
                                 <td>
                                 <td>
                                     <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
                                     <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
-                                    <img name="unlim-bandwidth" class="unlim-trigger" src="/images/unlim.png" />
+                                    <i class="unlim-trigger fas fa-infinity" id="unlim-bandwidth"></i>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                         <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                         <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>

+ 3 - 1
web/templates/admin/panel.html

@@ -11,7 +11,9 @@
 		<a href="/list/user/" class="l-logo"></a>
 		<a href="/list/user/" class="l-logo"></a>
 		<div class="l-menu clearfix noselect">
 		<div class="l-menu clearfix noselect">
 			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?><?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'USER' ) echo 'l-menu__item--active' ?>"><a href="/list/user/"><i class="fas fa-tasks panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Records')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?><?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'USER' ) echo 'l-menu__item--active' ?>"><a href="/list/user/"><i class="fas fa-tasks panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Records')?></a></div>
-			<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Fm')?></a></div>
+			<?php if ((isset($_SESSION['FILE_MANAGER'])) && (!empty($_SESSION['FILE_MANAGER'])) && ($_SESSION['FILE_MANAGER'] == "true")) {?>
+				<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Fm')?></a></div>
+			<?php } ?>
 			<div class="l-menu__item <?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/log/"><i class="fas fa-history panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Log')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/log/"><i class="fas fa-history panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Log')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?>"><a href="/list/stats/"><i class="fas fa-chart-line panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Statistics')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?>"><a href="/list/stats/"><i class="fas fa-chart-line panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Statistics')?></a></div>
 		</div>
 		</div>

+ 4 - 2
web/templates/user/panel.html

@@ -11,8 +11,10 @@
 		<a href="/list/web/" class="l-logo"></a>
 		<a href="/list/web/" class="l-logo"></a>
 		<div class="l-menu clearfix noselect">
 		<div class="l-menu clearfix noselect">
 			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?>"><a href="/list/web/"><i class="fas fa-tasks panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Records')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?>"><a href="/list/web/"><i class="fas fa-tasks panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Records')?></a></div>
-			<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Fm')?></a></div>
-			<div class="l-menu__item <?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/log/"><i class="fas fa-history panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Log')?></a></div>
+			<?php if ((isset($_SESSION['FILE_MANAGER'])) && (!empty($_SESSION['FILE_MANAGER'])) && ($_SESSION['FILE_MANAGER'] == "true")) {?>
+				<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Fm')?></a></div>
+			<?php } ?>
+				<div class="l-menu__item <?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/log/"><i class="fas fa-history panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Log')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?>"><a href="/list/stats/"><i class="fas fa-chart-line panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Statistics')?></a></div>
 			<div class="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?>"><a href="/list/stats/"><i class="fas fa-chart-line panel-icon"></i>&nbsp;&nbsp;&nbsp;<?=__('Statistics')?></a></div>
 		</div>
 		</div>
 		<div class="l-profile noselect">
 		<div class="l-profile noselect">

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است