소스 검색

Merge remote-tracking branch 'origin/main' into fastcgi-add-valid-length

Jaap Marcus 5 년 전
부모
커밋
2c08203dd2
100개의 변경된 파일314개의 추가작업 그리고 18개의 파일을 삭제
  1. 2 0
      bin/v-acknowledge-user-notification
  2. 2 0
      bin/v-add-backup-host
  3. 2 0
      bin/v-add-cron-hestia-autoupdate
  4. 2 0
      bin/v-add-cron-job
  5. 2 0
      bin/v-add-cron-letsencrypt-job
  6. 2 0
      bin/v-add-cron-reports
  7. 2 0
      bin/v-add-cron-restart-job
  8. 3 0
      bin/v-add-database
  9. 3 0
      bin/v-add-database-host
  10. 3 0
      bin/v-add-database-temp-user
  11. 3 0
      bin/v-add-dns-domain
  12. 3 0
      bin/v-add-dns-on-web-alias
  13. 3 0
      bin/v-add-dns-record
  14. 3 0
      bin/v-add-domain
  15. 2 0
      bin/v-add-fastcgi-cache
  16. 3 0
      bin/v-add-firewall-ban
  17. 2 0
      bin/v-add-firewall-ipset
  18. 2 0
      bin/v-add-firewall-rule
  19. 1 0
      bin/v-add-fs-archive
  20. 1 0
      bin/v-add-fs-directory
  21. 1 0
      bin/v-add-fs-file
  22. 3 0
      bin/v-add-letsencrypt-domain
  23. 3 0
      bin/v-add-letsencrypt-host
  24. 2 0
      bin/v-add-letsencrypt-user
  25. 3 0
      bin/v-add-mail-account
  26. 3 0
      bin/v-add-mail-account-alias
  27. 3 0
      bin/v-add-mail-account-autoreply
  28. 3 0
      bin/v-add-mail-account-forward
  29. 3 0
      bin/v-add-mail-account-fwd-only
  30. 5 1
      bin/v-add-mail-domain
  31. 3 0
      bin/v-add-mail-domain-antispam
  32. 3 0
      bin/v-add-mail-domain-antivirus
  33. 3 0
      bin/v-add-mail-domain-catchall
  34. 3 0
      bin/v-add-mail-domain-dkim
  35. 2 0
      bin/v-add-mail-domain-smtp-relay
  36. 4 0
      bin/v-add-mail-domain-ssl
  37. 3 0
      bin/v-add-remote-dns-domain
  38. 3 0
      bin/v-add-remote-dns-host
  39. 3 0
      bin/v-add-remote-dns-record
  40. 3 0
      bin/v-add-sys-filemanager
  41. 2 0
      bin/v-add-sys-firewall
  42. 4 0
      bin/v-add-sys-ip
  43. 2 0
      bin/v-add-sys-pma-sso
  44. 2 0
      bin/v-add-sys-quota
  45. 5 4
      bin/v-add-sys-rainloop
  46. 4 1
      bin/v-add-sys-roundcube
  47. 2 0
      bin/v-add-sys-sftp-jail
  48. 2 0
      bin/v-add-sys-smtp-relay
  49. 4 0
      bin/v-add-sys-webmail
  50. 2 0
      bin/v-add-user
  51. 2 0
      bin/v-add-user-2fa
  52. 5 0
      bin/v-add-user-composer
  53. 2 0
      bin/v-add-user-notification
  54. 2 0
      bin/v-add-user-package
  55. 2 0
      bin/v-add-user-sftp-jail
  56. 2 0
      bin/v-add-user-sftp-key
  57. 2 0
      bin/v-add-user-ssh-key
  58. 4 0
      bin/v-add-user-wp-cli
  59. 4 0
      bin/v-add-web-domain
  60. 4 0
      bin/v-add-web-domain-alias
  61. 4 0
      bin/v-add-web-domain-allow-users
  62. 3 0
      bin/v-add-web-domain-backend
  63. 3 0
      bin/v-add-web-domain-ftp
  64. 3 0
      bin/v-add-web-domain-httpauth
  65. 4 0
      bin/v-add-web-domain-proxy
  66. 2 0
      bin/v-add-web-domain-redirect
  67. 4 0
      bin/v-add-web-domain-ssl
  68. 2 0
      bin/v-add-web-domain-ssl-force
  69. 2 0
      bin/v-add-web-domain-ssl-hsts
  70. 2 0
      bin/v-add-web-domain-ssl-preset
  71. 3 0
      bin/v-add-web-domain-stats
  72. 3 0
      bin/v-add-web-domain-stats-user
  73. 2 0
      bin/v-add-web-php
  74. 5 0
      bin/v-backup-user
  75. 2 0
      bin/v-backup-users
  76. 2 0
      bin/v-change-cron-job
  77. 3 0
      bin/v-change-database-host-password
  78. 4 0
      bin/v-change-database-owner
  79. 3 0
      bin/v-change-database-password
  80. 4 0
      bin/v-change-database-user
  81. 2 0
      bin/v-change-dns-domain-exp
  82. 3 0
      bin/v-change-dns-domain-ip
  83. 3 0
      bin/v-change-dns-domain-soa
  84. 3 0
      bin/v-change-dns-domain-tpl
  85. 3 0
      bin/v-change-dns-domain-ttl
  86. 3 0
      bin/v-change-dns-record
  87. 3 0
      bin/v-change-dns-record-id
  88. 4 1
      bin/v-change-domain-owner
  89. 2 0
      bin/v-change-firewall-rule
  90. 1 0
      bin/v-change-fs-file-permission
  91. 3 0
      bin/v-change-mail-account-password
  92. 3 0
      bin/v-change-mail-account-quota
  93. 3 0
      bin/v-change-mail-domain-catchall
  94. 3 0
      bin/v-change-mail-domain-sslcert
  95. 3 0
      bin/v-change-remote-dns-domain-exp
  96. 3 0
      bin/v-change-remote-dns-domain-soa
  97. 3 0
      bin/v-change-remote-dns-domain-ttl
  98. 33 11
      bin/v-change-sys-api
  99. 8 0
      bin/v-change-sys-config-value
  100. 2 0
      bin/v-change-sys-db-alias

+ 2 - 0
bin/v-acknowledge-user-notification

@@ -17,7 +17,9 @@ user=$1
 id=$2
 id=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-backup-host

@@ -23,7 +23,9 @@ path=${5-/backup}
 port=$6
 port=$6
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Paths
 # Paths

+ 2 - 0
bin/v-add-cron-hestia-autoupdate

@@ -15,7 +15,9 @@ user=admin
 mode=$1
 mode=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -25,7 +25,9 @@ job=$8
 restart=$9
 restart=$9
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 HIDE=7
 HIDE=7

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

@@ -11,7 +11,9 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -17,7 +17,9 @@
 user=$1
 user=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -11,7 +11,9 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-add-database

@@ -29,8 +29,11 @@ charset=${7-UTF8}
 charset=$(echo "$charset" |tr '[:lower:]' '[:upper:]')
 charset=$(echo "$charset" |tr '[:lower:]' '[:upper:]')
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 if [ "$type" = "pgsql" ]; then
 if [ "$type" = "pgsql" ]; then

+ 3 - 0
bin/v-add-database-host

@@ -27,8 +27,11 @@ template=${7}
 port=${8}
 port=${8}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 is_mysql_host_alive() {
 is_mysql_host_alive() {

+ 3 - 0
bin/v-add-database-temp-user

@@ -25,8 +25,11 @@ if [ "$ttl" == '' ]; then
 fi
 fi
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -31,8 +31,11 @@ ns8=${11}
 restart=${12}
 restart=${12}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

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

@@ -19,8 +19,11 @@ ip=$3
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-add-dns-record

@@ -33,8 +33,11 @@ if [ -z "$priority" ]; then
 fi
 fi
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Null priority for none MX/SRV records
 # Null priority for none MX/SRV records

+ 3 - 0
bin/v-add-domain

@@ -19,8 +19,11 @@ ip=$3
 restart="${4-yes}"
 restart="${4-yes}"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-fastcgi-cache

@@ -21,7 +21,9 @@ debug=${4-no}
 restart=${5-no}
 restart=${5-no}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-add-firewall-ban

@@ -23,8 +23,11 @@ chain=$(echo $2|tr '[:lower:]' '[:upper:]')
 iptables="/sbin/iptables"
 iptables="/sbin/iptables"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/firewall.sh
 source $HESTIA/func/firewall.sh
 source $HESTIA/func/firewall.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -18,7 +18,9 @@ autoupdate=${4:-yes}
 force=${5:-no}
 force=${5:-no}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -25,7 +25,9 @@ comment=$5
 rule=$6
 rule=$6
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Get next firewall rule id
 # Get next firewall rule id

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

@@ -11,6 +11,7 @@ user=$1
 archive=$2
 archive=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -11,6 +11,7 @@ user=$1
 dst_dir=$2
 dst_dir=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -11,6 +11,7 @@ user=$1
 dst_file=$2
 dst_file=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -19,8 +19,11 @@ aliases=$3
 mail=${4// }
 mail=${4// }
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # LE API
 # LE API

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

@@ -19,8 +19,11 @@ user="$($HESTIA/bin/v-search-domain-owner "$domain" web)"
 [[ -z "$user" ]] && user="admin"
 [[ -z "$user" ]] && user="admin"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Perform verification if read-only mode is enabled
 # Perform verification if read-only mode is enabled

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

@@ -16,7 +16,9 @@
 user=$1
 user=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # LE API
 # LE API

+ 3 - 0
bin/v-add-mail-account

@@ -20,8 +20,11 @@ password=$4; HIDE=4
 quota=${5-unlimited}
 quota=${5-unlimited}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-account-alias

@@ -20,8 +20,11 @@ account=$3
 malias=$4
 malias=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-account-autoreply

@@ -20,8 +20,11 @@ account=$3
 autoreply=$4
 autoreply=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Define mail user
 # Define mail user

+ 3 - 0
bin/v-add-mail-account-forward

@@ -20,8 +20,11 @@ account=$3
 email_forward=$4
 email_forward=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-account-fwd-only

@@ -19,8 +19,11 @@ domain_idn=$2
 account=$3
 account=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Define mail user
 # Define mail user

+ 5 - 1
bin/v-add-mail-domain

@@ -21,10 +21,14 @@ dkim=${5-yes}
 dkim_size=${6-1024}
 dkim_size=${6-1024}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
-source $HESTIA/conf/hestia.conf
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
+source $HESTIA/conf/hestia.conf
 
 
 # Define mail user
 # Define mail user
 if [ "$MAIL_SYSTEM" = 'exim4' ]; then
 if [ "$MAIL_SYSTEM" = 'exim4' ]; then

+ 3 - 0
bin/v-add-mail-domain-antispam

@@ -18,8 +18,11 @@ domain=$2
 domain_idn=$2
 domain_idn=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-domain-antivirus

@@ -18,8 +18,11 @@ domain=$2
 domain_idn=$2
 domain_idn=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-domain-catchall

@@ -19,8 +19,11 @@ domain_idn=$2
 email="$3"
 email="$3"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-mail-domain-dkim

@@ -19,8 +19,11 @@ domain_idn=$2
 dkim_size=${3-1024}
 dkim_size=${3-1024}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Define mail user
 # Define mail user

+ 2 - 0
bin/v-add-mail-domain-smtp-relay

@@ -20,7 +20,9 @@ password=$5
 port=${6-587}
 port=${6-587}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 4 - 0
bin/v-add-mail-domain-ssl

@@ -32,9 +32,13 @@ fi
 domain_idn=$(idn -t --quiet -a "$domain")
 domain_idn=$(idn -t --quiet -a "$domain")
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

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

@@ -19,8 +19,11 @@ flush=$3
 
 
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-add-remote-dns-host

@@ -33,8 +33,11 @@ dns_user=${6-dns-cluster}
 DNS_USER=$dns_user
 DNS_USER=$dns_user
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -18,8 +18,11 @@ domain=$2
 id=$3
 id=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -11,8 +11,11 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
+# shellcheck source=/usr/local/hestia/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 
 
 MODE=$1
 MODE=$1

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

@@ -13,7 +13,9 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 4 - 0
bin/v-add-sys-ip

@@ -31,9 +31,13 @@ nat_ip=$7
 helo=$8
 helo=$8
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-sys-pma-sso

@@ -14,7 +14,9 @@
 MODE=$1
 MODE=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 PMA_INSTALL="/usr/share/phpmyadmin"
 PMA_INSTALL="/usr/share/phpmyadmin"

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

@@ -14,7 +14,9 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 5 - 4
bin/v-add-sys-rainloop

@@ -10,8 +10,11 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
+# shellcheck source=/usr/local/hestia/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 
 
 MODE=$1
 MODE=$1
@@ -100,8 +103,6 @@ if [ "$UPDATE" == "no" ]; then
     echo "Forbidden" >  ./data/index.html
     echo "Forbidden" >  ./data/index.html
 
 
     # Create database
     # Create database
-    mysql -e "DROP DATABASE rainloop"
-    mysql -e "DROP USER rainloop@localhost"
     mysql -e "CREATE DATABASE rainloop"
     mysql -e "CREATE DATABASE rainloop"
     # Mysql available on system
     # Mysql available on system
     r=$(generate_password)
     r=$(generate_password)
@@ -170,5 +171,5 @@ fi
 
 
 
 
 
 
-log_history "Rouncube successfuly installed" '' 'admin'
-log_event "$OK" "$ARGUMENTS"
+log_history "Rainloop successfuly installed" '' 'admin'
+log_event "$OK" "$ARGUMENTS"

+ 4 - 1
bin/v-add-sys-roundcube

@@ -10,8 +10,11 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
+# shellcheck source=/usr/local/hestia/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 source $HESTIA/install/upgrade/upgrade.conf
 
 
 MODE=$2
 MODE=$2
@@ -190,5 +193,5 @@ fi
 
 
 
 
 
 
-log_history "Rouncube successfuly installed" '' 'admin'
+log_history "Roundcube successfuly installed" '' 'admin'
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"

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

@@ -14,7 +14,9 @@
 
 
 # Includes
 # Includes
 source /etc/profile
 source /etc/profile
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 restart=$1
 restart=$1

+ 2 - 0
bin/v-add-sys-smtp-relay

@@ -18,7 +18,9 @@ password=$3
 port=${4-587}
 port=${4-587}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -32,9 +32,13 @@ if [[ "$domain" =~ .*\.$ ]]; then
 fi
 fi
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 2 - 0
bin/v-add-user

@@ -23,7 +23,9 @@ if [ ! -z "$6" ]; then
     name="$name $6";
     name="$name $6";
 fi
 fi
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 is_user_free() {
 is_user_free() {

+ 2 - 0
bin/v-add-user-2fa

@@ -16,7 +16,9 @@
 user=$1
 user=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 5 - 0
bin/v-add-user-composer

@@ -19,7 +19,12 @@ user=$1
 if [ -z "$HESTIA" ]; then
 if [ -z "$HESTIA" ]; then
     HESTIA="/usr/local/hestia"
     HESTIA="/usr/local/hestia"
 fi
 fi
+
+# Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
+source $HESTIA/conf/hestia.conf
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

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

@@ -17,7 +17,9 @@ notice=$(echo $3 |sed "s/'/%quote%/g")
 type=$4
 type=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-user-package

@@ -16,7 +16,9 @@ package=$2
 rewrite=$3
 rewrite=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Functions
 # Functions

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

@@ -17,7 +17,9 @@ user=$1
 restart=$2
 restart=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -15,7 +15,9 @@ user=$1
 ttl=$2
 ttl=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -18,7 +18,9 @@ user=$1
 key=$2
 key=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 4 - 0
bin/v-add-user-wp-cli

@@ -18,7 +18,11 @@ user=$1
 if [ -z "$HESTIA" ]; then
 if [ -z "$HESTIA" ]; then
     HESTIA="/usr/local/hestia"
     HESTIA="/usr/local/hestia"
 fi
 fi
+
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
+source $HESTIA/conf/hestia.conf
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 4 - 0
bin/v-add-web-domain

@@ -28,9 +28,13 @@ aliases=$5
 proxy_ext=$6
 proxy_ext=$6
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 4 - 0
bin/v-add-web-domain-alias

@@ -21,9 +21,13 @@ aliases=$3
 restart="$4"
 restart="$4"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 4 - 0
bin/v-add-web-domain-allow-users

@@ -20,9 +20,13 @@ domain=$2
 domain_idn=$2
 domain_idn=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-web-domain-backend

@@ -19,8 +19,11 @@ template=${3-default}
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-add-web-domain-ftp

@@ -21,8 +21,11 @@ password=$4; HIDE=4
 ftp_path=$5
 ftp_path=$5
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-web-domain-httpauth

@@ -20,8 +20,11 @@ password=$4; HIDE=4
 restart=${5-yes}
 restart=${5-yes}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Defining htpasswd file
 # Defining htpasswd file

+ 4 - 0
bin/v-add-web-domain-proxy

@@ -23,9 +23,13 @@ extentions=${4-$default_extentions}
 restart="$5"
 restart="$5"
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-web-domain-redirect

@@ -25,7 +25,9 @@ code=${4-301}
 restart=${5-no}
 restart=${5-no}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 4 - 0
bin/v-add-web-domain-ssl

@@ -39,9 +39,13 @@ domain=$domain
 domain_idn=$(idn -t --quiet -a "$domain")
 domain_idn=$(idn -t --quiet -a "$domain")
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
 source $HESTIA/func/ip.sh
 source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 2 - 0
bin/v-add-web-domain-ssl-force

@@ -17,7 +17,9 @@ user=$1
 domain=$2
 domain=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-web-domain-ssl-hsts

@@ -15,7 +15,9 @@ user=$1
 domain=$2
 domain=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-web-domain-ssl-preset

@@ -18,7 +18,9 @@ domain=$2
 ssl=$3
 ssl=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 3 - 0
bin/v-add-web-domain-stats

@@ -22,8 +22,11 @@ domain_idn=$2
 type=$3
 type=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-add-web-domain-stats-user

@@ -20,8 +20,11 @@ password=$4; HIDE=4
 restart=$5
 restart=$5
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-add-web-php

@@ -16,7 +16,9 @@
 version=$1
 version=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 5 - 0
bin/v-backup-user

@@ -20,10 +20,15 @@ user=$1
 notify=${2-no}
 notify=${2-no}
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/func/backup.sh
 source $HESTIA/func/backup.sh
 source $HESTIA/func/backup.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-backup-users

@@ -17,7 +17,9 @@
 source /etc/profile
 source /etc/profile
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Perform verification if read-only mode is enabled
 # Perform verification if read-only mode is enabled

+ 2 - 0
bin/v-change-cron-job

@@ -24,7 +24,9 @@ wday=$7
 command=$8
 command=$8
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-change-database-host-password

@@ -19,8 +19,11 @@ dbuser=$3
 password=$4; HIDE=4
 password=$4; HIDE=4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 4 - 0
bin/v-change-database-owner

@@ -18,9 +18,13 @@ user=$2
 
 
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/func/rebuild.sh
 source $HESTIA/func/rebuild.sh
 source $HESTIA/func/rebuild.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 3 - 0
bin/v-change-database-password

@@ -19,8 +19,11 @@ database=$2
 password=$3; HIDE=3
 password=$3; HIDE=3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 4 - 0
bin/v-change-database-user

@@ -19,9 +19,13 @@ dbuser="$user"_"$3"
 password=$4; HIDE=4
 password=$4; HIDE=4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/db.sh
 source $HESTIA/func/db.sh
 source $HESTIA/func/db.sh
+# shellcheck source=/usr/local/hestia/func/rebuild.sh
 source $HESTIA/func/rebuild.sh
 source $HESTIA/func/rebuild.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -20,7 +20,9 @@ domain_idn=$2
 exp=$3
 exp=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-dns-domain-ip

@@ -20,8 +20,11 @@ ip=$3
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-dns-domain-soa

@@ -21,8 +21,11 @@ soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-dns-domain-tpl

@@ -22,8 +22,11 @@ template=$3
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-dns-domain-ttl

@@ -20,8 +20,11 @@ ttl=$3
 restart=$4
 restart=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-dns-record

@@ -25,8 +25,11 @@ restart=$8
 ttl=$9
 ttl=$9
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

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

@@ -21,8 +21,11 @@ newid=$4
 restart=$5
 restart=$5
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 4 - 1
bin/v-change-domain-owner

@@ -17,8 +17,11 @@ domain=$1
 user=$2
 user=$2
 
 
 # Includes
 # Includes
-source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/ip.sh
+source $HESTIA/func/ip.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 2 - 0
bin/v-change-firewall-rule

@@ -26,7 +26,9 @@ protocol=$(echo $protocol|tr '[:lower:]' '[:upper:]')
 comment=$6
 comment=$6
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Sort function
 # Sort function

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

@@ -12,6 +12,7 @@ src_file=$2
 permissions=$3
 permissions=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-mail-account-password

@@ -20,8 +20,11 @@ account=$3
 password=$4; HIDE=4
 password=$4; HIDE=4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-mail-account-quota

@@ -20,8 +20,11 @@ account=$3
 quota=$4
 quota=$4
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-mail-domain-catchall

@@ -19,8 +19,11 @@ domain_idn=$2
 email=$3
 email=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

+ 3 - 0
bin/v-change-mail-domain-sslcert

@@ -18,8 +18,11 @@ domain_idn=$2
 restart=$3
 restart=$3
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/domain.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/func/domain.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Additional argument formatting
 # Additional argument formatting

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

@@ -15,8 +15,11 @@ user=$1
 domain=$2
 domain=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -17,8 +17,11 @@ user=$1
 domain=$2
 domain=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

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

@@ -17,8 +17,11 @@ user=$1
 domain=$2
 domain=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/func/remote.sh
 source $HESTIA/func/remote.sh
 source $HESTIA/func/remote.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

+ 33 - 11
bin/v-change-sys-api

@@ -15,7 +15,9 @@
 status=$1
 status=$1
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -23,7 +25,7 @@ source $HESTIA/conf/hestia.conf
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 check_args '1' "$#" "STATUS"
 check_args '1' "$#" "STATUS"
-is_type_valid "enable,disable" "$status"
+is_type_valid "enable,disable,remove" "$status"
 
 
 # Perform verification if read-only mode is enabled
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 check_hestia_demo_mode
@@ -33,25 +35,45 @@ check_hestia_demo_mode
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$status" = "enable" ]; then
 if [ "$status" = "enable" ]; then
-    if [ $API = "no" ]; then
-        if [ ! -f "$HESTIA/web/api/index.php" ]; then
-            wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
-        else
-            sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
+    if [ ! -f "$HESTIA/web/api/index.php" ]; then
+        wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/$RELEASE_BRANCH/web/api/index.php -O $HESTIA/web/api/index.php
+        check_api_download=$(cat $HESTIA/web/api/index.php)
+        if [ -z "$HESTIA/web/api/index.php" ]; then
+            # Throw error message to user
+            echo "ERROR: API installation failed."
+            # Remove empty file created by wget output
+            rm -f "$HESTIA/web/api/index.php"
+            exit 1
         fi
         fi
-        $HESTIA/bin/v-change-sys-config-value "API" "yes"
+    else
+        sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
+        sed -i 's|////|//|g' $HESTIA/web/api/index.php
     fi
     fi
+    $HESTIA/bin/v-change-sys-config-value "API" "yes"
 else
 else
-    if [ $API = "yes" ]; then
-        $HESTIA/bin/v-change-sys-config-value "API" "no"
-        $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
+    $HESTIA/bin/v-change-sys-config-value "API" "no"
+    $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
+    if [ "$status" != "remove" ]; then
         sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
         sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
     fi
     fi
 fi
 fi
 
 
+if [ "$status" = "remove" ]; then
+    if [ ! -f "$HESTIA/web/api/index.php" ]; then
+        echo "ERROR: API is not installed."
+        exit 1
+    else
+        rm -f "$HESTIA/web/api/index.php"
+    fi
+fi
+
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Logging                            #
 #                       Logging                            #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-log_history "API status has been changed to $status" '' 'admin'
+if [ "$status" = "enable" ] || [ "$status" = "disable" ]; then
+    log_history "API status has been changed to $status" '' 'admin'
+else
+    log_history "API has been disabled and removed" '' 'admin'
+fi
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"

+ 8 - 0
bin/v-change-sys-config-value

@@ -18,7 +18,9 @@ key=$(echo "$1" | tr '[:lower:]' '[:upper:]' )
 value=$2
 value=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
 PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
@@ -46,6 +48,12 @@ else
     sed -i "s|$key=.*|$key='$value'|g" $HESTIA/conf/hestia.conf
     sed -i "s|$key=.*|$key='$value'|g" $HESTIA/conf/hestia.conf
 fi
 fi
 
 
+# Sort configuration file in alphabetical order on change
+sort $HESTIA/conf/hestia.conf -o /tmp/updconf
+mv $HESTIA/conf/hestia.conf $HESTIA/conf/hestia.conf.bak
+mv /tmp/updconf $HESTIA/conf/hestia.conf
+rm -f $HESTIA/conf/hestia.conf.bak
+
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 2 - 0
bin/v-change-sys-db-alias

@@ -22,7 +22,9 @@ type=$1
 alias=$2
 alias=$2
 
 
 # Includes
 # Includes
+# shellcheck source=/usr/local/hestia/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
+# shellcheck source=/usr/local/hestia/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.