Sfoglia il codice sorgente

Move apache hestia (mod_status) config to mods-available from mods-enabled

Robert Zollner 5 anni fa
parent
commit
e6dca969aa

+ 4 - 1
install/hst-install-debian.sh

@@ -1197,7 +1197,8 @@ if [ "$apache" = 'yes' ]; then
     
     
     # Copy configuration files
     # Copy configuration files
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
-    cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-enabled/
+    cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-available/hestia-status.conf
+    cp -f /etc/apache2/mods-available/status.load /etc/apache2/mods-available/hestia-status.load
     cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
     cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
     
     
@@ -1207,6 +1208,8 @@ if [ "$apache" = 'yes' ]; then
     a2enmod ssl > /dev/null 2>&1
     a2enmod ssl > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
     a2enconf --quiet hestia-event
     a2enconf --quiet hestia-event
+    a2dismod --quiet status > /dev/null 2>&1
+    a2enmod --quiet hestia-status
 
 
     if [ "$phpfpm" = 'yes' ]; then
     if [ "$phpfpm" = 'yes' ]; then
         # Disable prefork and php, enable event
         # Disable prefork and php, enable event

+ 4 - 1
install/hst-install-ubuntu.sh

@@ -1189,7 +1189,8 @@ if [ "$apache" = 'yes' ]; then
 
 
     # Copy configuration files
     # Copy configuration files
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
-    cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-enabled/
+    cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-available/hestia-status.conf
+    cp -f /etc/apache2/mods-available/status.load /etc/apache2/mods-available/hestia-status.load
     cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
     cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
     
     
@@ -1199,6 +1200,8 @@ if [ "$apache" = 'yes' ]; then
     a2enmod ssl > /dev/null 2>&1
     a2enmod ssl > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
     a2enconf --quiet hestia-event
     a2enconf --quiet hestia-event
+    a2dismod --quiet status > /dev/null 2>&1
+    a2enmod --quiet hestia-status
 
 
     # Enable mod_ruid/mpm_itk or mpm_event
     # Enable mod_ruid/mpm_itk or mpm_event
     if [ "$phpfpm" = 'yes' ]; then
     if [ "$phpfpm" = 'yes' ]; then

+ 7 - 0
install/upgrade/versions/latest.sh

@@ -79,6 +79,13 @@ if [ "$WEB_SYSTEM" = "apache2" ]; then
         rm --force /etc/apache2/mods-enabled/hestia-event.conf # cleanup
         rm --force /etc/apache2/mods-enabled/hestia-event.conf # cleanup
         a2enconf --quiet hestia-event
         a2enconf --quiet hestia-event
     fi
     fi
+
+    # Move apache mod_status config to /mods-available and rename it to prevent losing changes on upgrade
+    cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-available/hestia-status.conf
+    cp -f /etc/apache2/mods-available/status.load /etc/apache2/mods-available/hestia-status.load
+    a2dismod --quiet status > /dev/null 2>&1
+    a2enmod --quiet hestia-status
+    rm --force /etc/apache2/mods-enabled/status.conf # a2dismod will not remove the file if it isn't a symlink
 fi
 fi
 
 
 # Install Filegator FileManager during upgrade
 # Install Filegator FileManager during upgrade