Skip to content

Commit ca62198

Browse files
committed
Put hestia-event apache config in conf.d folder during install,upgrade and migration script
1 parent 138e020 commit ca62198

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

install/hst-install-debian.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,15 +1199,13 @@ if [ "$apache" = 'yes' ]; then
11991199
cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
12001200
cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-available/hestia-status.conf
12011201
cp -f /etc/apache2/mods-available/status.load /etc/apache2/mods-available/hestia-status.load
1202-
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
12031202
cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
12041203

12051204
# Enable needed modules
12061205
a2enmod rewrite > /dev/null 2>&1
12071206
a2enmod suexec > /dev/null 2>&1
12081207
a2enmod ssl > /dev/null 2>&1
12091208
a2enmod actions > /dev/null 2>&1
1210-
a2enconf --quiet hestia-event
12111209
a2dismod --quiet status > /dev/null 2>&1
12121210
a2enmod --quiet hestia-status
12131211

@@ -1216,6 +1214,7 @@ if [ "$apache" = 'yes' ]; then
12161214
a2dismod php$fpm_v > /dev/null 2>&1
12171215
a2dismod mpm_prefork > /dev/null 2>&1
12181216
a2enmod mpm_event > /dev/null 2>&1
1217+
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf.d/
12191218
else
12201219
if [ "$release" -eq 10 ]; then
12211220
a2enmod mpm_itk > /dev/null 2>&1

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,15 +1191,13 @@ if [ "$apache" = 'yes' ]; then
11911191
cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
11921192
cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-available/hestia-status.conf
11931193
cp -f /etc/apache2/mods-available/status.load /etc/apache2/mods-available/hestia-status.load
1194-
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
11951194
cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
11961195

11971196
# Enable needed modules
11981197
a2enmod rewrite > /dev/null 2>&1
11991198
a2enmod suexec > /dev/null 2>&1
12001199
a2enmod ssl > /dev/null 2>&1
12011200
a2enmod actions > /dev/null 2>&1
1202-
a2enconf --quiet hestia-event
12031201
a2dismod --quiet status > /dev/null 2>&1
12041202
a2enmod --quiet hestia-status
12051203

@@ -1209,6 +1207,7 @@ if [ "$apache" = 'yes' ]; then
12091207
a2dismod php$fpm_v > /dev/null 2>&1
12101208
a2dismod mpm_prefork > /dev/null 2>&1
12111209
a2enmod mpm_event > /dev/null 2>&1
1210+
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf.d/
12121211
else
12131212
a2enmod ruid2 > /dev/null 2>&1
12141213
fi

install/upgrade/manual/migrate_mpm_event.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ for module in $a2modules; do
3434
done
3535

3636
a2enmod --quiet mpm_event
37+
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf.d/
3738

3839
# Check if all went well
3940
if ! apache2ctl configtest >/dev/null 2>&1; then
4041
echo "Something went wrong, rolling back. Please try to migrate manually to mpm_event."
4142
for module in $changed_a2modules; do
4243
a2enmod "$module"
4344
done
45+
rm --force /etc/apache2/conf.d/hestia-event.conf
46+
4447
exit 1
4548
fi
4649

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ if [ "$WEB_SYSTEM" = "apache2" ]; then
120120
rm --force /etc/apache2/conf-available/hestia-event.conf
121121
rm --force /etc/apache2/conf-enabled/hestia-event.conf
122122

123-
if [ ! -e "/etc/apache2/conf.d/hestia-event.conf" ]; then
123+
if [ $(a2query -M) = 'event' ] && [ ! -e "/etc/apache2/conf.d/hestia-event.conf" ]; then
124124
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf.d/
125125
fi
126126

0 commit comments

Comments
 (0)