purge javascript-common if installed, as it creates the /etc/apache2 dir, which we used to detect if apache is already installed
This commit is contained in:
parent
c329b13c29
commit
7e4a8eafb3
|
@ -132,6 +132,12 @@ if [[ "$macro" == *"VHost"* ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# make sure sendmail_path is set for php-fpm
|
||||||
|
if [[ -f /etc/php/$fpm/fpm/pool.d/$username.conf ]]; then
|
||||||
|
if ! /bin/grep -q "^php_admin_value\[sendmail_path\]" /etc/php/$fpm/fpm/pool.d/$username.conf; then
|
||||||
|
echo "php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -fwebmaster@$domain" >> /etc/php/$fpm/fpm/pool.d/$username.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "VirtualHost dir for $vhost does not exist."
|
echo "VirtualHost dir for $vhost does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -141,15 +141,16 @@ if [[ -d /srv/www/$domain ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /etc/ configs
|
# /etc/ configs
|
||||||
if [[ -d /srv/www/$domain/.exp/etc ]]; then
|
if [[ -d /srv/www/$domain/.exp/etc/letsencrypt ]]; then
|
||||||
echo "cp -a /srv/www/$domain/.exp/etc/* /etc/"
|
echo "cp -a /srv/www/$domain/.exp/etc/letsencrypt/* /etc/letsencrypt/"
|
||||||
echo "rm -r /srv/www/$domain/.exp/"
|
fi
|
||||||
echo "systemctl reload apache2.service"
|
if [[ -f /srv/www/$domain/.exp/etc/ssl/letsencrypt/$domain.pem ]]; then
|
||||||
echo "systemctl reload php7.4-fpm"
|
echo "cp -a /srv/www/$domain/.exp/etc/ssl/letsencrypt/$domain.pem /etc/ssl/letsencrypt/$domain.pem"
|
||||||
|
echo "vhost-enable.sh -m VHostHTTPS -d $domain"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "NOTE: check for PHP version on new server and adjust /srv/www/$domain/.exp/etc/php/ config and reload command accordingly"
|
echo "NOTE: check for PHP version changes on the on new server and an custom php-fpm configs in /srv/www/$domain/.exp/etc/php/ from the old server"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@ if [ -f "/usr/local/bin/vhost.sh" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# purge javascript-common, if installed, as it creates the /etc/apache2 dir
|
||||||
|
apt-get -y purge javascript-common
|
||||||
|
|
||||||
# check for existing web server software installs
|
# check for existing web server software installs
|
||||||
if [ -d "/etc/apache2/" ] || [ -d "/etc/php/" ] || [ -d "/etc/varnish/" ]; then
|
if [ -d "/etc/apache2/" ] || [ -d "/etc/php/" ] || [ -d "/etc/varnish/" ]; then
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue
Block a user