Przeglądaj źródła

Added additional lockdown for demo mode on change commands.

Raphael Schneeberger 6 lat temu
rodzic
commit
63a60d4f64

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

@@ -104,6 +104,8 @@ if [ "$type" != 'local' ];then
     check_result $? "host connection failed" "$E_CONNECT"
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -66,6 +66,8 @@ sort_cron_jobs
 # Sync cronjobs with system crond
 sync_cron_jobs
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                       Hestia                             #

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

@@ -54,6 +54,7 @@ del_mail_ssl_config
 # Create new configuration
 add_mail_ssl_config
 
+
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-sys-hestia-ssl

@@ -27,6 +27,9 @@ source $HESTIA/conf/hestia.conf
 check_args '1' "$#" 'SSL_DIR [RESTART]'
 is_format_valid 'ssl_dir'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 1 - 0
bin/v-change-sys-hostname

@@ -27,6 +27,7 @@ is_format_valid 'domain'
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-sys-ip-name

@@ -28,6 +28,9 @@ is_format_valid 'ip'
 is_format_valid 'ip_name'
 is_ip_valid "$ip"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-sys-ip-nat

@@ -29,6 +29,9 @@ is_format_valid 'ip'
 is_format_valid 'nat_ip'
 is_ip_valid "$ip"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 4 - 0
bin/v-change-sys-ip-owner

@@ -31,6 +31,10 @@ is_ip_valid "$ip"
 is_ip_key_empty '$U_WEB_DOMAINS'
 is_ip_key_empty '$U_SYS_USERS'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-sys-ip-status

@@ -36,6 +36,9 @@ if [ "$web_domains" -ne '0' ] && [ "$sys_user" != "$ip_owner" ]; then
     check_result "$E_INUSE" "ip $ip is used"
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-sys-language

@@ -35,6 +35,9 @@ check_args '1' "$#" 'LANGUAGE'
 is_format_valid 'language'
 is_language_valid $language
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 4 - 0
bin/v-change-sys-pma

@@ -28,6 +28,10 @@ if [[ ! ${PMA:0:1} == "/" ]]; then
     PMA="/$PMA"
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 3 - 0
bin/v-change-sys-port

@@ -46,6 +46,9 @@ is_port_valid() {
 check_args '1' "$#" 'PORT'
 is_port_valid
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 6 - 0
bin/v-change-sys-release

@@ -19,9 +19,15 @@ branch=$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                             #
 #----------------------------------------------------------#

+ 1 - 0
bin/v-change-sys-service-config

@@ -32,6 +32,7 @@ fi
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

+ 9 - 0
bin/v-change-sys-theme

@@ -14,6 +14,15 @@ 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-change-sys-timezone

@@ -32,6 +32,9 @@ is_timezone_valid() {
 check_args '1' "$#" 'TIMEZONE'
 is_timezone_valid
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -20,6 +20,10 @@ export $WEBMAIL_ALIAS
 OLD_ALIAS=$WEBMAIL_ALIAS
 NEW_ALIAS=$1
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

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

@@ -27,6 +27,9 @@ is_format_valid 'user' 'email'
 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 - 0
bin/v-change-user-language

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

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

@@ -28,6 +28,9 @@ is_format_valid 'user' 'fname' 'lname'
 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 - 0
bin/v-change-user-ns

@@ -61,6 +61,9 @@ fi
 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 - 0
bin/v-change-user-package

@@ -148,6 +148,9 @@ if [ "$force" != 'yes' ];then
     is_package_avalable
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -42,6 +42,9 @@ if [ "$user" = 'admin' ] && [ -e "$HESTIA/web/reset.admin" ]; then
     rm -f $HESTIA/web/reset.admin
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 2 - 0
bin/v-change-user-shell

@@ -17,6 +17,7 @@ shell=$2
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 
+
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#
@@ -29,6 +30,7 @@ is_object_unsuspended 'user' 'USER' "$user"
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
 
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#

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

@@ -29,6 +29,9 @@ is_format_valid 'user' 'template'
 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 - 0
bin/v-change-web-domain-backend-tpl

@@ -40,6 +40,9 @@ is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_backend_template_valid $template
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-web-domain-dirlist

@@ -36,6 +36,9 @@ 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                             #

+ 3 - 0
bin/v-change-web-domain-ftp-password

@@ -46,6 +46,9 @@ if [ -z "$(echo $FTP_USER | tr ':' '\n' | grep ^$ftp_user$)" ]; then
     exit $E_NOTEXIST
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-web-domain-ftp-path

@@ -51,6 +51,9 @@ if [ -z "$(echo $ftp_path_a |grep $HOMEDIR/$user/web/$domain)" ]; then
     exit $E_INVALID
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -43,6 +43,9 @@ if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then
     exit $E_NOTEXIST
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

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

+ 3 - 0
bin/v-change-web-domain-name

@@ -44,6 +44,9 @@ if [ ! -z "$check_new_domain" ]; then
     check_result $E_EXISTS "$new_domain already exists"
 fi
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

+ 3 - 0
bin/v-change-web-domain-proxy-tpl

@@ -45,6 +45,9 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
 is_proxy_template_valid $template
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -42,6 +42,9 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
 is_web_domain_cert_valid
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

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

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

@@ -40,6 +40,9 @@ is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_value_exist 'web' 'DOMAIN' "$domain" '$STATS'
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #

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

@@ -42,6 +42,9 @@ is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_web_template_valid "$template"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
 
 #----------------------------------------------------------#
 #                       Action                             #