remove old code, rearrange reload

This commit is contained in:
Matthew Saunders Brown 2024-06-14 12:41:43 -07:00
parent f6a7b845f6
commit 846f8bc41d

View File

@ -132,12 +132,6 @@ sed -i "s|session.gc_probability = 0|session.gc_probability = 1|g" /etc/php/$php
sed -i "s|session.gc_probability = 0|session.gc_probability = 1|g" /etc/php/$phpVersion/cli/php.ini sed -i "s|session.gc_probability = 0|session.gc_probability = 1|g" /etc/php/$phpVersion/cli/php.ini
# Configure PHP-FPM to use "ondemand" # Configure PHP-FPM to use "ondemand"
sed -i "s|pm = dynamic|pm = ondemand|g" /etc/php/$phpVersion/fpm/pool.d/www.conf sed -i "s|pm = dynamic|pm = ondemand|g" /etc/php/$phpVersion/fpm/pool.d/www.conf
systemctl reload apache2
## configure overrides
# sed -i "s|^user = www-data|user = $USERNAME|g" /etc/php/7.2/fpm/pool.d/www.conf
# sed -i "s|^group = www-data|group = $USERNAME|g" /etc/php/7.2/fpm/pool.d/www.conf
systemctl reload php$phpVersion-fpm
systemctl enable --now vhost-reload-php.path
if [ -d /srv/www ]; then if [ -d /srv/www ]; then
if [ -d /var/www ]; then if [ -d /var/www ]; then
@ -160,6 +154,10 @@ else
install --owner=vhost --group=vhost --mode=755 --directory /srv/www/html install --owner=vhost --group=vhost --mode=755 --directory /srv/www/html
fi fi
systemctl reload apache2
systemctl reload php$phpVersion-fpm
systemctl enable --now vhost-reload-php.path
# Webalizer # Webalizer
DEBIAN_FRONTEND=noninteractive apt-get -y install webalizer DEBIAN_FRONTEND=noninteractive apt-get -y install webalizer
cp etc/logrotate.d/apache2 /etc/logrotate.d/apache2 cp etc/logrotate.d/apache2 /etc/logrotate.d/apache2