Просмотр исходного кода

Merge branch 'staging/fixes' into main

Kristan Kenney 5 лет назад
Родитель
Сommit
5389bba481
100 измененных файлов с 250 добавлено и 52 удалено
  1. 2 0
      bin/v-add-cron-letsencrypt-job
  2. 2 0
      bin/v-add-cron-reports
  3. 2 0
      bin/v-add-cron-restart-job
  4. 11 8
      bin/v-add-database-host
  5. 2 0
      bin/v-add-dns-on-web-alias
  6. 3 0
      bin/v-add-fs-archive
  7. 3 0
      bin/v-add-fs-directory
  8. 3 0
      bin/v-add-fs-file
  9. 3 0
      bin/v-add-letsencrypt-domain
  10. 2 1
      bin/v-add-letsencrypt-host
  11. 2 1
      bin/v-add-letsencrypt-user
  12. 4 1
      bin/v-add-mail-account-forward
  13. 2 0
      bin/v-add-remote-dns-domain
  14. 2 1
      bin/v-add-remote-dns-host
  15. 2 0
      bin/v-add-remote-dns-record
  16. 2 0
      bin/v-add-sys-firewall
  17. 2 1
      bin/v-add-sys-quota
  18. 2 0
      bin/v-add-sys-sftp-jail
  19. 3 0
      bin/v-add-sys-theme
  20. 3 0
      bin/v-add-sys-webmail
  21. 5 2
      bin/v-add-user
  22. 2 1
      bin/v-add-user-notification
  23. 3 0
      bin/v-add-user-sftp-jail
  24. 2 0
      bin/v-add-user-sftp-key
  25. 2 1
      bin/v-add-web-domain-httpauth
  26. 1 1
      bin/v-add-web-domain-stats
  27. 2 2
      bin/v-add-web-domain-stats-user
  28. 2 0
      bin/v-backup-user
  29. 2 1
      bin/v-backup-users
  30. 2 0
      bin/v-change-dns-record-id
  31. 3 0
      bin/v-change-fs-file-permission
  32. 2 0
      bin/v-change-remote-dns-domain-exp
  33. 2 0
      bin/v-change-remote-dns-domain-soa
  34. 2 0
      bin/v-change-remote-dns-domain-ttl
  35. 3 0
      bin/v-change-user-php-cli
  36. 3 0
      bin/v-change-user-role
  37. 3 2
      bin/v-change-web-domain-sslhome
  38. 2 0
      bin/v-check-api-key
  39. 3 0
      bin/v-check-fs-permission
  40. 3 0
      bin/v-copy-fs-directory
  41. 3 0
      bin/v-copy-fs-file
  42. 2 1
      bin/v-delete-backup-host
  43. 2 1
      bin/v-delete-cron-reports
  44. 2 1
      bin/v-delete-cron-restart-job
  45. 2 0
      bin/v-delete-database-host
  46. 2 0
      bin/v-delete-dns-on-web-alias
  47. 3 0
      bin/v-delete-fs-directory
  48. 3 0
      bin/v-delete-fs-file
  49. 3 1
      bin/v-delete-mail-account-forward
  50. 2 1
      bin/v-delete-remote-dns-domain
  51. 2 1
      bin/v-delete-remote-dns-domains
  52. 2 1
      bin/v-delete-remote-dns-host
  53. 2 1
      bin/v-delete-remote-dns-record
  54. 2 1
      bin/v-delete-sys-quota
  55. 2 1
      bin/v-delete-sys-sftp-jail
  56. 6 0
      bin/v-delete-sys-theme
  57. 3 0
      bin/v-delete-sys-webmail
  58. 2 1
      bin/v-delete-user-sftp-jail
  59. 6 6
      bin/v-delete-web-domain-stats-user
  60. 3 0
      bin/v-download-backup
  61. 3 0
      bin/v-extract-fs-archive
  62. 4 1
      bin/v-generate-api-key
  63. 3 0
      bin/v-generate-ssl-cert
  64. 2 0
      bin/v-insert-dns-domain
  65. 2 0
      bin/v-insert-dns-record
  66. 2 0
      bin/v-insert-dns-records
  67. 3 0
      bin/v-move-fs-directory
  68. 3 0
      bin/v-move-fs-file
  69. 2 0
      bin/v-rebuild-all
  70. 2 1
      bin/v-rebuild-cron-jobs
  71. 2 1
      bin/v-rebuild-database
  72. 2 1
      bin/v-rebuild-databases
  73. 2 1
      bin/v-rebuild-dns-domain
  74. 2 1
      bin/v-rebuild-dns-domains
  75. 2 1
      bin/v-rebuild-mail-domain
  76. 2 1
      bin/v-rebuild-mail-domains
  77. 2 1
      bin/v-rebuild-user
  78. 2 1
      bin/v-rebuild-users
  79. 2 0
      bin/v-rebuild-web-domain
  80. 2 1
      bin/v-rebuild-web-domains
  81. 2 1
      bin/v-restore-user
  82. 2 0
      bin/v-schedule-letsencrypt-domain
  83. 2 0
      bin/v-schedule-user-backup
  84. 3 0
      bin/v-schedule-user-backup-download
  85. 2 0
      bin/v-schedule-user-restore
  86. 3 0
      bin/v-search-command
  87. 2 0
      bin/v-search-domain-owner
  88. 2 0
      bin/v-search-fs-object
  89. 3 0
      bin/v-search-object
  90. 3 0
      bin/v-search-user-object
  91. 2 0
      bin/v-sync-dns-cluster
  92. 2 0
      bin/v-unsuspend-database
  93. 2 0
      bin/v-unsuspend-database-host
  94. 2 0
      bin/v-unsuspend-databases
  95. 2 0
      bin/v-unsuspend-dns-domain
  96. 2 0
      bin/v-unsuspend-dns-domains
  97. 2 0
      bin/v-unsuspend-dns-record
  98. 2 0
      bin/v-unsuspend-domain
  99. 2 0
      bin/v-unsuspend-mail-account
  100. 2 0
      bin/v-unsuspend-mail-accounts

+ 2 - 0
bin/v-add-cron-letsencrypt-job

@@ -21,6 +21,8 @@ source $HESTIA/conf/hestia.conf
 
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-add-cron-reports

@@ -31,6 +31,8 @@ is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-add-cron-restart-job

@@ -21,6 +21,8 @@ source $HESTIA/conf/hestia.conf
 
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 11 - 8
bin/v-add-database-host

@@ -34,15 +34,16 @@ source $HESTIA/conf/hestia.conf
 is_mysql_host_alive() {
     mycnf=$(mktemp)
     echo "[client]">$mycnf
-    echo "host='$HOST'" >> $mycnf
-    echo "user='$USER'" >> $mycnf
-    echo "password='$PASSWORD'" >> $mycnf
-    echo "port='$PORT'" >> $mycnf
+    echo "host='$host'" >> $mycnf
+    echo "user='$user'" >> $mycnf
+    echo "password='$password'" >> $mycnf
+    echo "port='$port'" >> $mycnf
     
     chmod 600 $mycnf
     mysql --defaults-file=$mycnf -e 'SELECT VERSION()' >/dev/null 2>&1
     rm $mycnf
-    if [ '0' -ne "$?" ]; then
+    
+    if [ "$?" -ne '0' ]; then
         echo "Error: MySQL connection to $host failed"
         log_event "$E_CONNECT" "$ARGUMENTS"
         exit $E_CONNECT
@@ -52,7 +53,7 @@ is_mysql_host_alive() {
 is_pgsql_host_alive() {
     export PGPASSWORD="$dbpass"
     psql -h $host -U $dbuser -p $port -c "SELECT VERSION()" > /dev/null 2>&1
-    if [ '0' -ne "$?" ]; then
+    if [ "$?" -ne '0' ]; then
         echo "Error: PostgreSQL connection to $host failed"
         log_event "$E_CONNECT" "$ARGUMENTS"
         exit $E_CONNECT
@@ -73,8 +74,8 @@ if [ -z $template ]; then template="template1"; fi
 database_set_default_ports
 
 is_format_valid 'host' 'dbuser' 'max_db' 'charsets' 'template' 'port'
-#is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
-#is_type_valid "$DB_SYSTEM" "$type"
+is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
+is_type_valid "$DB_SYSTEM" "$type"
 is_dbhost_new
 is_password_valid
 dbpass="$password"
@@ -84,6 +85,8 @@ case $type in
     pgsql) is_pgsql_host_alive ;;
 esac
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-add-dns-on-web-alias

@@ -37,6 +37,8 @@ if [ -e "$USER_DATA/dns/$alias.conf" ]; then
     exit
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-add-fs-archive

@@ -21,6 +21,9 @@ check_args '3' "$#" 'USER ARCHIVE FILE [FILE_2] [FILE_3] [FILE ...]'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd |cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-add-fs-directory

@@ -21,6 +21,9 @@ check_args '2' "$#" 'USER DIR'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-add-fs-file

@@ -21,6 +21,9 @@ check_args '2' "$#" 'USER FILE'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-add-letsencrypt-domain

@@ -106,6 +106,9 @@ debug_log() {
     echo -e "\n==[${1}]==\n${2}\n" >> "$log_file"
 }
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-add-letsencrypt-host

@@ -23,7 +23,8 @@ source $HESTIA/func/main.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/conf/hestia.conf
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-add-letsencrypt-user

@@ -66,7 +66,8 @@ if [ ! -z "$KID" ]; then
     exit
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 4 - 1
bin/v-add-mail-account-forward

@@ -34,7 +34,10 @@ format_domain_idn
 #----------------------------------------------------------#
 
 check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD'
-is_format_valid 'user' 'domain' 'account' 'email_forward'
+is_format_valid 'user' 'domain' 'account'
+if [ "$email_forward"  != ':blackhole:' ]; then
+    is_format_valid 'email_forward'
+fi
 is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"

+ 2 - 0
bin/v-add-remote-dns-domain

@@ -34,6 +34,8 @@ is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_procces_running
 remote_dns_health_check
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 1
bin/v-add-remote-dns-host

@@ -55,7 +55,8 @@ is_password_valid
 is_dnshost_new
 is_dnshost_alive
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-remote-dns-record

@@ -35,6 +35,8 @@ is_object_valid 'dns' 'DOMAIN' "$domain"
 is_procces_running
 remote_dns_health_check
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-add-sys-firewall

@@ -25,6 +25,8 @@ if [ "$FIREWALL_SYSTEM" = 'iptables' ]; then
     exit
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 1
bin/v-add-sys-quota

@@ -46,7 +46,8 @@ if [ $? -ne 0 ]; then
     fi
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-sys-sftp-jail

@@ -23,6 +23,8 @@ restart=$1
 #                    Verifications                         #
 #----------------------------------------------------------#
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-add-sys-theme

@@ -26,6 +26,9 @@ source $HESTIA/conf/hestia.conf
 # Define themes repository URL format
 HESTIA_THEMES_REPO="$HESTIA_GIT_REPO/$RELEASE_BRANCH/install/deb/themes"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-add-sys-webmail

@@ -55,6 +55,9 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'mail' 'DOMAIN' "$domain"
 is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 5 - 2
bin/v-add-user

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add system user
-# options: USER PASSWORD EMAIL [PACKAGE] [NAME]
+# options: USER PASSWORD EMAIL [PACKAGE] [NAME] [LASTNAME]
 # labels: 
 #
 # example: v-add-user admin2 P4$$w@rD bgates@aol.com
@@ -18,7 +18,10 @@ password=$2; HIDE=2
 email=$3
 package=${4-default}
 name=$5
-
+# Last name has been added for backward compatibility with WHMCS / Blesta VestaCP Plugins
+if [ ! -z "$6" ]; then 
+    name="$name $6";
+fi
 # Includes
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf

+ 2 - 1
bin/v-add-user-notification

@@ -29,7 +29,8 @@ check_args '2' "$#" 'USER TOPIC NOTICE [TYPE]'
 is_format_valid 'user' 'topic' 'notice'
 is_object_valid 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-add-user-sftp-jail

@@ -49,6 +49,9 @@ if [[ " ${users[@]} " =~ " ${user} " ]]; then
     exit;
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-add-user-sftp-key

@@ -27,6 +27,8 @@ check_args '1' "$#" 'USER [TTL]'
 is_format_valid 'user' 'ttl'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 1
bin/v-add-web-domain-httpauth

@@ -31,7 +31,8 @@ shtaccess="$htaccess"
 shtpasswd="$htpasswd"
 docroot="$HOMEDIR/$user/web/$domain/public_html"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#

+ 1 - 1
bin/v-add-web-domain-stats

@@ -1,5 +1,5 @@
 #!/bin/bash
-# info: add log analyzer to generate domain statitics
+# info: add log analyzer to generate domain statistics
 # options: USER DOMAIN TYPE
 # labels: web
 #

+ 2 - 2
bin/v-add-web-domain-stats-user

@@ -52,8 +52,8 @@ conf_dir="$HOMEDIR/$user/conf/web"
 
 # Adding htaccess file
 if [ "$WEB_SYSTEM" = 'nginx' ]; then
-    echo "auth_basic \"Web Statistics\";" > $conf_dir/$domain.auth
-    echo "auth_basic_user_file $stats_dir/.htpasswd;" >> $conf_dir/$domain.auth
+    echo "auth_basic \"Web Statistics\";" > $stats_dir/auth.conf
+    echo "auth_basic_user_file $stats_dir/.htpasswd;" >> $stats_dir/auth.conf
 else
     echo "AuthUserFile $stats_dir/.htpasswd" > $stats_dir/.htaccess
     echo "AuthName \"Web Statistics\"" >> $stats_dir/.htaccess

+ 2 - 0
bin/v-backup-user

@@ -38,6 +38,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_backup_enabled
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 1
bin/v-backup-users

@@ -20,7 +20,8 @@ source /etc/profile
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-dns-record-id

@@ -45,6 +45,8 @@ is_object_unsuspended 'dns' 'DOMAIN' "$domain"
 is_object_valid "dns/$domain" 'ID' "$id"
 is_object_new "dns/$domain" 'ID' "$newid"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-fs-file-permission

@@ -22,6 +22,9 @@ check_args '3' "$#" 'USER FILE PERMISSIONS'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 2 - 0
bin/v-change-remote-dns-domain-exp

@@ -32,6 +32,8 @@ is_object_valid 'dns' 'DOMAIN' "$domain"
 is_procces_running
 remote_dns_health_check
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-change-remote-dns-domain-soa

@@ -34,6 +34,8 @@ is_object_valid 'dns' 'DOMAIN' "$domain"
 is_procces_running
 remote_dns_health_check
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-change-remote-dns-domain-ttl

@@ -34,6 +34,8 @@ is_object_valid 'dns' 'DOMAIN' "$domain"
 is_procces_running
 remote_dns_health_check
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-user-php-cli

@@ -58,6 +58,9 @@ if grep -q "alias php='env php$version'" "$FILE"; then
   exit;
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-user-role

@@ -33,6 +33,9 @@ is_object_valid 'user' 'USER' "$user"
 
 is_object_unsuspended 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 2
bin/v-change-web-domain-sslhome

@@ -3,9 +3,10 @@
 # options: USER DOMAIN SSL_HOME [RESTART]
 # labels: web
 #
-# example: v-change-web-domain-sslhome admin acme.com /home/admin/acme.com/public_shtml
+# example: v-change-web-domain-sslhome admin acme.com single
+# example: v-change-web-domain-sslhome admin acme.com same
 #
-# The function changes SSL home directory.
+# The function changes SSL home directory. Single will seperate the both public_html / public_shtml. Same will always point to public_shtml
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

+ 2 - 0
bin/v-check-api-key

@@ -22,6 +22,8 @@ time_n_date=$(date +'%T %F')
 time=$(echo "$time_n_date" |cut -f 1 -d \ )
 date=$(echo "$time_n_date" |cut -f 2 -d \ )
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-check-fs-permission

@@ -21,6 +21,9 @@ check_args '2' "$#" 'USER FILE'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-copy-fs-directory

@@ -22,6 +22,9 @@ check_args '3' "$#" 'USER SRC_DIRECTORY DST_DIRECTORY'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-copy-fs-file

@@ -22,6 +22,9 @@ check_args '3' "$#" 'USER SRC_FILE DST_FILE'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 2 - 1
bin/v-delete-backup-host

@@ -32,7 +32,8 @@ if [ -z "$types" ]; then
     exit $E_INVALID
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-cron-reports

@@ -31,7 +31,8 @@ is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-cron-restart-job

@@ -21,7 +21,8 @@ source $HESTIA/conf/hestia.conf
 
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-delete-database-host

@@ -34,6 +34,8 @@ is_type_valid "$DB_SYSTEM" "$type"
 is_object_valid "../../conf/$type" 'HOST' "$host"
 is_dbhost_free
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-delete-dns-on-web-alias

@@ -32,6 +32,8 @@ format_domain
 format_domain_idn
 # TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                    Verifications                         #

+ 3 - 0
bin/v-delete-fs-directory

@@ -22,6 +22,9 @@ check_args '2' "$#" 'USER DIRECTORY'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-delete-fs-file

@@ -22,6 +22,9 @@ check_args '2' "$#" 'USER FILE'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 1
bin/v-delete-mail-account-forward

@@ -34,7 +34,9 @@ format_domain_idn
 #----------------------------------------------------------#
 
 check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD'
-is_format_valid 'user' 'domain' 'account' 'forward'
+if [ "$forward"  != ':blackhole:' ]; then
+    is_format_valid 'forward'
+fi
 is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"

+ 2 - 1
bin/v-delete-remote-dns-domain

@@ -32,7 +32,8 @@ is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_procces_running
 remote_dns_health_check
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-remote-dns-domains

@@ -28,7 +28,8 @@ is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_procces_running
 remote_dns_health_check
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-remote-dns-host

@@ -30,7 +30,8 @@ is_format_valid 'host'
 is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-remote-dns-record

@@ -33,7 +33,8 @@ is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_procces_running
 remote_dns_health_check
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-sys-quota

@@ -21,7 +21,8 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-sys-sftp-jail

@@ -25,7 +25,8 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 6 - 0
bin/v-delete-sys-theme

@@ -20,6 +20,12 @@ theme=$1
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-delete-sys-webmail

@@ -41,6 +41,9 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'mail' 'DOMAIN' "$domain"
 is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-delete-user-sftp-jail

@@ -40,7 +40,8 @@ if [[ ! " ${users[@]} " =~ " ${user} " ]]; then
     exit
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 6 - 6
bin/v-delete-web-domain-stats-user

@@ -1,5 +1,5 @@
 #!/bin/bash
-# info: disable webdomain stats  authentication support
+# info: disable web domain stats authentication support
 # options: USER DOMAIN [RESTART]
 # labels: web
 #
@@ -47,14 +47,14 @@ check_hestia_demo_mode
 #                       Action                             #
 #----------------------------------------------------------#
 
-# Defining statistic dir
-rm -f $HOMEDIR/$user/web/$domain/stats/.htpasswd
-rm -f $HOMEDIR/$user/web/$domain/stats/.htaccess
+# Deleting statistic dir
+stats_dir="$HOMEDIR/$user/web/$domain/stats"
+rm -f $stats_dir/.htpasswd
+rm -f $stats_dir/.htaccess
 
 # Deleting nginx auth config
 if [ "$WEB_SYSTEM" = 'nginx' ]; then
-    conf_dir="$HOMEDIR/$user/conf/web"
-    rm -f $conf_dir/$domain.auth 2>/dev/null
+    rm -f $stats_dir/auth.conf 2>/dev/null
     $BIN/v-restart-web $restart
     check_result $? "Web restart failed" >/dev/null
 fi

+ 3 - 0
bin/v-download-backup

@@ -40,6 +40,9 @@ source $HESTIA/func/backup.sh
 check_args '2' "$#" 'USER BACKUP'
 is_format_valid 'user' 'backup'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-extract-fs-archive

@@ -25,6 +25,9 @@ check_args '3' "$#" 'USER ARCHIVE DIRECTORY [SELECTED_DIR] [STRIP] [TEST]'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 4 - 1
bin/v-generate-api-key

@@ -12,13 +12,16 @@
 #                    Variable&Function                     #
 #----------------------------------------------------------#
 
+source $HESTIA/func/main.sh
+
 keygen() {
     < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
 }
 KEYS="$HESTIA/data/keys/"
 HASH=$(keygen)
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-generate-ssl-cert

@@ -76,6 +76,9 @@ if [ ! -f /root/.rnd ]; then
     touch /root/.rnd
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-insert-dns-domain

@@ -44,6 +44,8 @@ if [ "$flush" = 'no' ]; then
     is_domain_new 'dns' $domain
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-insert-dns-record

@@ -33,6 +33,8 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'dns' 'DOMAIN' "$domain"
 parse_object_kv_list "$data"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-insert-dns-records

@@ -32,6 +32,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'dns' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-move-fs-directory

@@ -23,6 +23,9 @@ check_args '3' "$#" 'USER SRC_DIRECTORY DST_DIRECTORY'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 3 - 0
bin/v-move-fs-file

@@ -23,6 +23,9 @@ check_args '3' "$#" 'USER SRC_FILE DST_FILE'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Checking user homedir
 homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
 if [ -z $homedir ]; then

+ 2 - 0
bin/v-rebuild-all

@@ -37,6 +37,8 @@ is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 1
bin/v-rebuild-cron-jobs

@@ -30,7 +30,8 @@ is_format_valid 'user'
 is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-database

@@ -33,7 +33,8 @@ is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_valid 'db' 'DB' "$database"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-databases

@@ -31,7 +31,8 @@ is_format_valid 'user'
 is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-dns-domain

@@ -36,7 +36,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'dns' 'DOMAIN' "$domain"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-dns-domains

@@ -37,7 +37,8 @@ if [ "$DNS_SYSTEM" = 'remote' ]; then
     exit
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-mail-domain

@@ -45,7 +45,8 @@ if [ "$MAIL_SYSTEM" = 'remote' ]; then
     exit
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-mail-domains

@@ -42,7 +42,8 @@ if [ "$MAIL_SYSTEM" = 'remote' ]; then
     exit
 fi
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-user

@@ -34,7 +34,8 @@ is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-users

@@ -27,7 +27,8 @@ export PATH=$PATH:/usr/sbin
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-rebuild-web-domain

@@ -36,6 +36,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-rebuild-web-domains

@@ -34,7 +34,8 @@ is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 
-
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 1
bin/v-restore-user

@@ -203,7 +203,7 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
         echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log
 
         # Cleanup previous domain keys
-        unset -v DOMAIN IP IP6 ALIAS TPL SSL SSL_HOME LETSENCRYPT FTP_USER FTP_MD5 BACKEND PROXY PROXY_EXT STATS STATS_USER STATS_CRYPT U_DISK
+        unset -v DOMAIN IP IP6 ALIAS TPL SSL SSL_HOME LETSENCRYPT FTP_USER FTP_MD5 BACKEND PROXY PROXY_EXT STATS STATS_USER STATS_CRYPT U_DISK CUSTOM_DOCROOT CUSTOM_PHPROOT
 
         # Checking domain existance
         check_config=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
@@ -302,6 +302,7 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
 
             # Merging web.conf keys
             str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
+            str="$str CUSTOM_DOCROOT='$CUSTOM_DOCROOT' CUSTOM_PHPROOT='$CUSTOM_PHPROOT' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
             str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
             str="$str LETSENCRYPT='$LETSENCRYPT' FTP_USER='$FTP_USER'"
             str="$str FTP_MD5='$FTP_MD5' BACKEND='$BACKEND' PROXY='$PROXY'"

+ 2 - 0
bin/v-schedule-letsencrypt-domain

@@ -36,6 +36,8 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-schedule-user-backup

@@ -31,6 +31,8 @@ is_object_valid 'user' 'USER' "$user"
 is_backup_enabled
 is_backup_scheduled 'backup'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-schedule-user-backup-download

@@ -32,6 +32,9 @@ source $HESTIA/conf/hestia.conf
 check_args '2' "$#" 'USER BACKUP'
 is_format_valid 'user' 'backup'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-schedule-user-restore

@@ -38,6 +38,8 @@ is_object_valid 'user' 'USER' "$user"
 is_backup_enabled
 is_backup_scheduled 'restore'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-search-command

@@ -25,6 +25,9 @@ if [ $# -eq 0 ]; then
     exit 1
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 2 - 0
bin/v-search-domain-owner

@@ -26,6 +26,8 @@ source $HESTIA/func/main.sh
 
 check_args '1' "$#" 'DOMAIN [TYPE]'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-search-fs-object

@@ -14,6 +14,8 @@ path=$3
 # Includes
 source $HESTIA/func/main.sh
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-search-object

@@ -20,6 +20,9 @@ format=${2-shell}
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Json list function
 json_list_search() {
     echo '{'

+ 3 - 0
bin/v-search-user-object

@@ -21,6 +21,9 @@ format=${3-shell}
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 # Json list function
 json_list_search() {
     echo '{'

+ 2 - 0
bin/v-sync-dns-cluster

@@ -28,6 +28,8 @@ is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
 is_procces_running
 remote_dns_health_check 'no_email'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-database

@@ -33,6 +33,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_valid 'db' 'DB' "$database"
 is_object_suspended 'db' 'DB' "$database"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-database-host

@@ -31,6 +31,8 @@ is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
 is_object_valid "../../conf/$type" 'HOST' "$host"
 is_object_suspended "../../conf/$type" 'HOST' "$host"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-databases

@@ -28,6 +28,8 @@ is_format_valid 'user'
 is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-dns-domain

@@ -26,6 +26,8 @@ format_domain
 format_domain_idn
 # TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                    Verifications                         #

+ 2 - 0
bin/v-unsuspend-dns-domains

@@ -30,6 +30,8 @@ is_format_valid 'user'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-dns-record

@@ -29,6 +29,8 @@ format_domain
 format_domain_idn
 # TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                    Verifications                         #

+ 2 - 0
bin/v-unsuspend-domain

@@ -30,6 +30,8 @@ check_args '2' "$#" 'USER DOMAIN'
 is_format_valid 'user' 'domain'
 is_object_valid 'user' 'USER' "$user"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-mail-account

@@ -43,6 +43,8 @@ is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 is_object_valid "mail/$domain" 'ACCOUNT' "$account"
 is_object_suspended "mail/$domain" 'ACCOUNT' "$account"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 2 - 0
bin/v-unsuspend-mail-accounts

@@ -39,6 +39,8 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'mail' 'DOMAIN' "$domain"
 is_object_unsuspended 'mail' 'DOMAIN' "$domain"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

Некоторые файлы не были показаны из-за большого количества измененных файлов