centreon-web-apache.postinst 581 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if [ "$1" = "configure" ] ; then

  if [ -f "/etc/apache2/sites-available/centreon.conf" ]; then
    a2enconf centreon.conf
    a2enmod headers
    a2enmod proxy_fcgi setenvif proxy rewrite
    a2enmod alias proxy proxy_fcgi
    a2enconf php8.0-fpm
    a2dismod php8.0
12
13
14
    # Remove default Debian Apache configuration
    rm /etc/apache2/sites-enabled/000-default.conf
    # Restart apache2
15
16
17
    systemctl restart apache2 php8.0-fpm
  fi

Luiz Costa's avatar
Luiz Costa committed
18
19
20
21
22
  if [ "$(getent passwd www-data)" ]; then
    usermod -a -G centreon www-data
    usermod -a -G www-data centreon
  fi

23
24
fi

25
exit 0