Skip to content

Commit 6127cd4

Browse files
author
Kristan Kenney
committed
Add additional checks for demo mode
1 parent a12c3a2 commit 6127cd4

13 files changed

+32
-2
lines changed

bin/v-change-sys-release

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ branch=$1
1919
source $HESTIA/func/main.sh
2020
source $HESTIA/conf/hestia.conf
2121

22+
# Perform verification if read-only mode is enabled
23+
check_hestia_demo_mode
24+
2225
#----------------------------------------------------------#
2326
# Action #
2427
#----------------------------------------------------------#

bin/v-change-sys-service-config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if [ ! -e "$src" ]; then
2929
check_result "$E_NOTEXIST" "$src config doesn't exist"
3030
fi
3131

32+
# Perform verification if read-only mode is enabled
33+
check_hestia_demo_mode
34+
3235
#----------------------------------------------------------#
3336
# Action #
3437
#----------------------------------------------------------#

bin/v-change-user-password

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ password=$2; HIDE=2
1717
source $HESTIA/func/main.sh
1818
source $HESTIA/conf/hestia.conf
1919

20-
2120
#----------------------------------------------------------#
2221
# Verifications #
2322
#----------------------------------------------------------#
@@ -28,6 +27,8 @@ is_object_valid 'user' 'USER' "$user"
2827
is_object_unsuspended 'user' 'USER' "$user"
2928
is_password_valid
3029

30+
# Perform verification if read-only mode is enabled
31+
check_hestia_demo_mode
3132

3233
#----------------------------------------------------------#
3334
# Action #

bin/v-change-user-shell

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ shell=$2
1717
source $HESTIA/func/main.sh
1818
source $HESTIA/conf/hestia.conf
1919

20-
2120
#----------------------------------------------------------#
2221
# Verifications #
2322
#----------------------------------------------------------#
@@ -27,6 +26,8 @@ is_format_valid 'user' 'shell'
2726
is_object_valid 'user' 'USER' "$user"
2827
is_object_unsuspended 'user' 'USER' "$user"
2928

29+
# Perform verification if read-only mode is enabled
30+
check_hestia_demo_mode
3031

3132
#----------------------------------------------------------#
3233
# Action #

bin/v-delete-cron-job

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ is_object_unsuspended 'user' 'USER' "$user"
3030
is_object_valid 'cron' 'JOB' "$job"
3131
is_object_unsuspended 'cron' 'JOB' "$job"
3232

33+
# Perform verification if read-only mode is enabled
34+
check_hestia_demo_mode
3335

3436
#----------------------------------------------------------#
3537
# Action #

bin/v-delete-database

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ is_object_unsuspended 'user' 'USER' "$user"
3232
is_object_valid 'db' 'DB' "$database"
3333
is_object_unsuspended 'db' 'DB' "$database"
3434

35+
# Perform verification if read-only mode is enabled
36+
check_hestia_demo_mode
3537

3638
#----------------------------------------------------------#
3739
# Action #

bin/v-delete-firewall-rule

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ is_format_valid 'rule'
2929
is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
3030
is_object_valid '../../data/firewall/rules' 'RULE' "$rule"
3131

32+
# Perform verification if read-only mode is enabled
33+
check_hestia_demo_mode
3234

3335
#----------------------------------------------------------#
3436
# Action #

bin/v-delete-mail-domain

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ is_object_valid 'mail' 'DOMAIN' "$domain"
3838
is_object_unsuspended 'mail' 'DOMAIN' "$domain"
3939

4040

41+
# Perform verification if read-only mode is enabled
42+
check_hestia_demo_mode
43+
4144
#----------------------------------------------------------#
4245
# Action #
4346
#----------------------------------------------------------#

bin/v-delete-sys-ip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ is_ip_valid "$ip"
3030
is_ip_key_empty '$U_WEB_DOMAINS'
3131
is_ip_key_empty '$U_SYS_USERS'
3232

33+
# Perform verification if read-only mode is enabled
34+
check_hestia_demo_mode
3335

3436
#----------------------------------------------------------#
3537
# Action #

bin/v-delete-user

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ if [ "$user" = 'admin' ]; then
3434
exit
3535
fi
3636

37+
# Perform verification if read-only mode is enabled
38+
check_hestia_demo_mode
39+
3740
#----------------------------------------------------------#
3841
# Action #
3942
#----------------------------------------------------------#

0 commit comments

Comments
 (0)