Skip to content

Commit b90423c

Browse files
author
Kristan Kenney
committed
Add call to sanitize_config_file on user rebuild
Ensure variables are set and created if missing
1 parent 70b378f commit b90423c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

bin/v-change-user-theme

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ check_hestia_demo_mode
4646
#----------------------------------------------------------#
4747

4848
# Set theme value
49+
check_ckey=$(grep "THEME" $USER_DATA/user.conf)
50+
if [ -z "$check_ckey" ]; then
51+
# Rebuild user configuration to repair missing value
52+
$BIN/v-rebuild-user $user
53+
fi
4954
update_user_value "$user" '$THEME' "$theme"
5055

5156
#----------------------------------------------------------#

func/rebuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# User account rebuild
22
rebuild_user_conf() {
33

4+
sanitize_config_file "user"
5+
46
# Get user variables
57
source $USER_DATA/user.conf
68

0 commit comments

Comments
 (0)