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
|
||||
# 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
|
||||
echo "VirtualHost dir for $vhost does not exist."
|
||||
exit 1
|
||||
|
|
|
@ -141,15 +141,16 @@ if [[ -d /srv/www/$domain ]]; then
|
|||
fi
|
||||
|
||||
# /etc/ configs
|
||||
if [[ -d /srv/www/$domain/.exp/etc ]]; then
|
||||
echo "cp -a /srv/www/$domain/.exp/etc/* /etc/"
|
||||
echo "rm -r /srv/www/$domain/.exp/"
|
||||
echo "systemctl reload apache2.service"
|
||||
echo "systemctl reload php7.4-fpm"
|
||||
if [[ -d /srv/www/$domain/.exp/etc/letsencrypt ]]; then
|
||||
echo "cp -a /srv/www/$domain/.exp/etc/letsencrypt/* /etc/letsencrypt/"
|
||||
fi
|
||||
if [[ -f /srv/www/$domain/.exp/etc/ssl/letsencrypt/$domain.pem ]]; then
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ if [ -f "/usr/local/bin/vhost.sh" ]; then
|
|||
exit
|
||||
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
|
||||
if [ -d "/etc/apache2/" ] || [ -d "/etc/php/" ] || [ -d "/etc/varnish/" ]; then
|
||||
echo
|
||||
|
|
Loading…
Reference in New Issue
Block a user