Skip to content

Commit 78e7e60

Browse files
author
Kristan Kenney
committed
Ensure File Manager configuration is updated on each upgrade
1 parent f54fa8e commit 78e7e60

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

func/upgrade.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ upgrade_start_routine() {
159159
upgrade_refresh_config
160160
fi
161161

162-
# Upgrade to Version 1.1.2
162+
# Upgrade to Version 1.2.0
163163
if [ $VERSION = "1.1.1" ]; then
164164
source $HESTIA/install/upgrade/versions/latest.sh
165165
VERSION="$new_version"
@@ -214,6 +214,13 @@ upgrade_phpmyadmin() {
214214
fi
215215
}
216216

217+
upgrade_fm_configuration() {
218+
if [ -e "$HESTIA/web/fm/configuration.php" ]; then
219+
echo "(*) Updating File Manager Configuration..."
220+
cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
221+
fi
222+
}
223+
217224
upgrade_get_version() {
218225
# Retrieve new version number for Hestia Control Panel from .deb package
219226
new_version=$(dpkg -l | awk '$2=="hestia" { print $3 }')

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,9 @@ fi
134134

135135
# Install Filegator FileManager during upgrade
136136
if [ ! -e "$HESTIA/web/fm/configuration.php" ]; then
137-
echo "(*) Configuring Filegator FileManager..."
138-
137+
echo "(*) Installing File Manager..."
139138
# Install the FileManager
140139
source $HESTIA_INSTALL_DIR/filemanager/install-fm.sh > /dev/null 2>&1
141-
else
142-
echo "(*) Update Filegator Configuration..."
143-
# Update configuration.php
144-
cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
145140
fi
146141

147142
# Enable nginx module loading

src/deb/hestia/postinst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ upgrade_start_routine
3737
# Upgrade phpMyAdmin if applicable
3838
upgrade_phpmyadmin
3939

40+
# Ensure that File Manager configuration is up-to-date
41+
upgrade_fm_configuration
42+
4043
# Set new version number in hestia.conf
4144
upgrade_set_version
4245

0 commit comments

Comments
 (0)