Просмотр исходного кода

Move apache hestia config to conf-available from mods-enabled

Robert Zollner 5 лет назад
Родитель
Сommit
19946b6645
3 измененных файлов с 8 добавлено и 4 удалено
  1. 2 1
      install/hst-install-debian.sh
  2. 2 1
      install/hst-install-ubuntu.sh
  3. 4 2
      install/upgrade/versions/latest.sh

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

@@ -1198,7 +1198,7 @@ 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-enabled/
-    cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/mods-enabled/
+    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/
     
     
     # Enable needed modules
     # Enable needed modules
@@ -1206,6 +1206,7 @@ if [ "$apache" = 'yes' ]; then
     a2enmod suexec > /dev/null 2>&1
     a2enmod suexec > /dev/null 2>&1
     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
 
 
     if [ "$phpfpm" = 'yes' ]; then
     if [ "$phpfpm" = 'yes' ]; then
         # Disable prefork and php, enable event
         # Disable prefork and php, enable event

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

@@ -1190,7 +1190,7 @@ 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-enabled/
-    cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/mods-enabled/
+    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/
     
     
     # Enable needed modules
     # Enable needed modules
@@ -1198,6 +1198,7 @@ if [ "$apache" = 'yes' ]; then
     a2enmod suexec > /dev/null 2>&1
     a2enmod suexec > /dev/null 2>&1
     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
 
 
     # Enable mod_ruid/mpm_itk or mpm_event
     # Enable mod_ruid/mpm_itk or mpm_event
     if [ "$phpfpm" = 'yes' ]; then
     if [ "$phpfpm" = 'yes' ]; then

+ 4 - 2
install/upgrade/versions/latest.sh

@@ -74,8 +74,10 @@ fi
 
 
 # Add hestia-event.conf, if the server is running apache2
 # Add hestia-event.conf, if the server is running apache2
 if [ "$WEB_SYSTEM" = "apache2" ]; then
 if [ "$WEB_SYSTEM" = "apache2" ]; then
-    if [ ! -e "/etc/apache2/mods-enabled/hestia-event.conf" ]; then
-        cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/mods-enabled/
+    if [ ! -e "/etc/apache2/conf-enabled/hestia-event.conf" ]; then
+        cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf-available/
+        rm --force /etc/apache2/mods-enabled/hestia-event.conf # cleanup
+        a2enconf --quiet hestia-event
     fi
     fi
 fi
 fi