Skip to content

Commit d3e27fa

Browse files
author
Kristan Kenney
committed
Merge remote-tracking branch 'origin/bugfix-0708'
2 parents e5a1b7f + 92bde36 commit d3e27fa

File tree

14 files changed

+32
-77
lines changed

14 files changed

+32
-77
lines changed

bin/v-add-sys-theme

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ source $HESTIA/func/main.sh
1919
source $HESTIA/conf/hestia.conf
2020

2121
# Define themes repository URL format
22-
HESTIA_THEMES_REPO="$HESTIA_GIT_REPO/$RELEASE_BRANCH/themes"
22+
HESTIA_THEMES_REPO="$HESTIA_GIT_REPO/$RELEASE_BRANCH/install/deb/themes"
2323

2424
#----------------------------------------------------------#
2525
# Action #
@@ -48,7 +48,6 @@ fi
4848
# Check if theme name already exists as system theme
4949
if [ -e $HESTIA_THEMES/$theme.css ]; then
5050
echo "ERROR: System theme with the same name already exists: $theme."
51-
echo " To update system themes, run v-update-sys-themes."
5251
exit 1
5352
fi
5453

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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,15 @@ csv_list() {
8181
#----------------------------------------------------------#
8282

8383
# Parsing templates
84+
85+
# System provided themes
8486
themes=$(ls -v $HESTIA_THEMES/)
87+
themes=$(echo "$themes" | grep '\.css' | sed 's/\.css$//')
88+
89+
# Custom themes
8590
themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)
86-
themes=$(echo "$themes" |grep '\.css' |sed 's/\.css$//')
87-
themes_custom=$(echo "$themes_custom" |grep '\.css' |sed 's/\.css$//')
91+
themes_custom=$(echo "$themes_custom" | grep '\.css' | sed 's/\.css$//')
92+
8893

8994
# Listing data
9095
case $format in

bin/v-update-sys-hestia-git

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ if [ "$HESTIA_B" = true ] ; then
349349

350350
# Move needed directories
351351
cd $BUILD_DIR/hestiacp-$branch
352-
mv bin func install themes web ../hestia_$HESTIA_V/usr/local/hestia/
352+
mv bin func install web ../hestia_$HESTIA_V/usr/local/hestia/
353353

354354
# Set permission
355355
cd ../hestia_$HESTIA_V/usr/local/hestia/bin

bin/v-update-sys-themes

Lines changed: 0 additions & 43 deletions
This file was deleted.

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DNSTPL=$HESTIA/data/templates/dns
1616
RRD=$HESTIA/web/rrd
1717
SENDMAIL="$HESTIA/web/inc/mail-wrapper.php"
1818
HESTIA_GIT_REPO="https://raw.githubusercontent.com/hestiacp/hestiacp"
19-
HESTIA_THEMES="$HESTIA/themes"
19+
HESTIA_THEMES="$HESTIA_INSTALL_DIR/themes"
2020
HESTIA_THEMES_CUSTOM="$HESTIA/data/templates/themes"
2121
SCRIPT="$(basename $0)"
2222

func/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ upgrade_start_routine() {
121121
# Upgrade to Version 1.0.3
122122
if [ $VERSION = "1.0.2" ]; then
123123
source $HESTIA/install/upgrade/versions/previous/1.0.3.sh
124-
VERSION="$new_version"
124+
VERSION="1.0.3"
125125
upgrade_refresh_config
126126
fi
127127

install/hst-install-debian.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,6 @@ cp -rf $HESTIA_INSTALL_DIR/templates $HESTIA/data/
11251125
mkdir -p /var/www/html
11261126
mkdir -p /var/www/document_errors
11271127

1128-
# Installing default themes
1129-
mkdir -p $HESTIA/themes
1130-
cp -rf $HESTIA_INSTALL_DIR/themes $HESTIA/themes/
1131-
11321128
# Install default success page
11331129
cp -rf $HESTIA_INSTALL_DIR/templates/web/unassigned/index.html /var/www/html/
11341130
cp -rf $HESTIA_INSTALL_DIR/templates/web/skel/document_errors/* /var/www/document_errors/
@@ -1827,7 +1823,7 @@ fi
18271823
$HESTIA/bin/v-change-sys-port $port
18281824

18291825
# Set default theme
1830-
$HESTIA/bin/v-change-sys-theme default
1826+
$HESTIA/bin/v-change-sys-theme 'default'
18311827

18321828
# Starting Hestia service
18331829
update-rc.d hestia defaults

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,6 @@ cp -rf $HESTIA_INSTALL_DIR/templates $HESTIA/data/
10781078
mkdir -p /var/www/html
10791079
mkdir -p /var/www/document_errors
10801080

1081-
# Installing default themes
1082-
mkdir -p $HESTIA/themes
1083-
cp -rf $HESTIA_INSTALL_DIR/themes $HESTIA/themes/
1084-
10851081
# Install default success page
10861082
cp -rf $HESTIA_INSTALL_DIR/templates/web/unassigned/index.html /var/www/html/
10871083
cp -rf $HESTIA_INSTALL_DIR/templates/web/skel/document_errors/* /var/www/document_errors/
@@ -1714,7 +1710,7 @@ fi
17141710
$HESTIA/bin/v-change-sys-port $port
17151711

17161712
# Set default theme
1717-
$HESTIA/bin/v-change-sys-theme default
1713+
$HESTIA/bin/v-change-sys-theme 'default'
17181714

17191715
# Starting Hestia service
17201716
update-rc.d hestia defaults

0 commit comments

Comments
 (0)