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