Some monor fixes
This commit is contained in:
parent
514ab799ef
commit
f04ad9e5e1
@ -218,6 +218,8 @@ done
|
||||
_set_apache_conf_symlink=false
|
||||
apache_installed=false
|
||||
nginx_installed=false
|
||||
nginx_init_script=/etc/init.d/nginx
|
||||
apache_control_script=/etc/init.d/apache2
|
||||
|
||||
if [[ "$WEBSERVER_INSTALLATION" = "Apache2_Debian" ]] ;then
|
||||
APACHE_VHOST_DIR=/etc/apache2/sites-enabled
|
||||
@ -501,7 +503,7 @@ fi
|
||||
if $apache_installed ; then
|
||||
apache_control_script=`which apachectl`
|
||||
echononl " Restarting (graceful) apache webserver.."
|
||||
if [[ -n "$apache_control_script" ]]; then
|
||||
if [[ -x "$apache_control_script" ]]; then
|
||||
$apache_control_script graceful
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
@ -520,13 +522,15 @@ fi
|
||||
if $nginx_installed ; then
|
||||
nginx_init_script=/etc/init.d/nginx
|
||||
echononl " Restarting nginx webserver.."
|
||||
/etc/init.d/nginx restart > /dev/null 2>&1
|
||||
if [[ -x "$nginx_init_script" ]]; then
|
||||
$nginx_init_script restart > /dev/null 2>&1
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
warn "Restart of nginx webserver failed.."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -2180,6 +2184,10 @@ while [[ "X\$VHOST_DIR" = "X" ]]; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ! -d "\$VHOST_DIR" ]]; then
|
||||
fatal "No Webserver VHost Configuration directory found!"
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo -e "\033[32m--\033[m"
|
||||
@ -2625,7 +2633,6 @@ while [[ "X\$VHOST_DIR" = "X" ]]; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [[ ! -d "\$VHOST_DIR" ]]; then
|
||||
fatal "No Webserver VHost Configuration directory found!"
|
||||
fi
|
||||
@ -2679,7 +2686,7 @@ echo ""
|
||||
declare -a vhost_file_arr
|
||||
while IFS=' ' read -r site_server_name rest ; do
|
||||
unset vhost_file_arr
|
||||
if [[ "\$VHOST_DIR" = "\$APACHE_VHOST_DIR" ]]; then
|
||||
if [[ "\$VHOST_DIR" =~ apache ]]; then
|
||||
while IFS=' ' read filename_site ; do
|
||||
#if ! \$_apache_debian_install ; then
|
||||
# [[ -h "\$filename_site" ]] && continue
|
||||
@ -2716,7 +2723,7 @@ while IFS=' ' read -r site_server_name rest ; do
|
||||
continue
|
||||
fi
|
||||
failed=false
|
||||
if [[ "\$VHOST_DIR" = "\$APACHE_VHOST_DIR" ]]; then
|
||||
if [[ "\$VHOST_DIR" =~ apache ]]; then
|
||||
for _name in \${vhost_file_arr[@]} ; do
|
||||
perl -i -n -p -e s"#^(\s*)SSLCertificateFile.*#\1SSLCertificateFile \${_cert_dir}/fullchain.pem#" \$_name
|
||||
[[ \$? -ne 0 ]] && failed=true
|
||||
@ -2756,7 +2763,7 @@ if [[ -d "\${VHOST_DIR}.\$_date" ]]; then
|
||||
echo_failed
|
||||
fi
|
||||
else
|
||||
if [[ "\$VHOST_DIR" = "\$APACHE_VHOST_DIR" ]]; then
|
||||
if [[ "\$VHOST_DIR" =~ apache ]]; then
|
||||
if [[ -x "$apache_control_script" ]]; then
|
||||
$apache_control_script graceful > /dev/null 2>&1
|
||||
if [[ \$? -gt 0 ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user