Skip to content

Commit 7eb1f6d

Browse files
author
Kristan Kenney
committed
Minor fixes to theme backend code
1 parent 1def183 commit 7eb1f6d

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

bin/v-change-sys-theme

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ source $HESTIA/conf/hestia.conf
1818
# Action #
1919
#----------------------------------------------------------#
2020

21+
# Initialize local directory if it does not exist
22+
if [ ! -d "$HESTIA_THEMES_CUSTOM" ]; then
23+
mkdir -p $HESTIA_THEMES_CUSTOM
24+
fi
25+
2126
# Theme argument and file detection
2227
if [ -z "$theme" ]; then
2328
echo "ERROR: No theme specified."

bin/v-list-sys-themes

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ csv_list() {
8181
#----------------------------------------------------------#
8282

8383
# Parsing templates
84+
85+
# System provided themes
8486
themes=$(ls -v $HESTIA_THEMES/)
8587
themes=$(echo "$themes" | grep '\.css' | sed 's/\.css$//')
8688

87-
if [ ! -z "$HESTIA_THEMES_CUSTOM" ]; then
88-
themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)
89-
themes_custom=$(echo "$themes_custom" | grep '\.css' | sed 's/\.css$//')
90-
fi
89+
# Custom themes
90+
themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)
91+
themes_custom=$(echo "$themes_custom" | grep '\.css' | sed 's/\.css$//')
92+
9193

9294
# Listing data
9395
case $format in

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ fi
18231823
$HESTIA/bin/v-change-sys-port $port
18241824

18251825
# Set default theme
1826-
$HESTIA/bin/v-change-sys-config-value 'THEME' "default"
1826+
$HESTIA/bin/v-change-sys-theme 'default'
18271827

18281828
# Starting Hestia service
18291829
update-rc.d hestia defaults

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ fi
17101710
$HESTIA/bin/v-change-sys-port $port
17111711

17121712
# Set default theme
1713-
$HESTIA/bin/v-change-sys-config-value 'THEME' "default"
1713+
$HESTIA/bin/v-change-sys-theme 'default'
17141714

17151715
# Starting Hestia service
17161716
update-rc.d hestia defaults

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Set default theme
1010
if [ -z $THEME ]; then
1111
echo "(*) Enabling support for themes..."
12-
$BIN/v-change-sys-config-value 'THEME' default
12+
$BIN/v-change-sys-theme 'default'
1313
fi
1414

1515
# Reduce SSH login grace time

0 commit comments

Comments
 (0)