Compare commits
2 Commits
af38c2c044
...
d103562362
Author | SHA1 | Date |
---|---|---|
|
d103562362 | |
|
a1dc79f11f |
|
@ -286,6 +286,13 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo
|
||||||
http_block_end=$((http_block_end + 1))
|
http_block_end=$((http_block_end + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
if [[ -z "$(grep -E 'include\s+\/etc\/nginx\/modules-enabled\/\*\.conf;' /etc/nginx/nginx.conf)" ]]; then
|
||||||
|
nginx_conf_path="/etc/nginx/nginx.conf"
|
||||||
|
nginx_conf_contents=`echo "$(echo 'include /etc/nginx/modules-enabled/*.conf;'; cat $nginx_conf_path)"`
|
||||||
|
sudo bash -l -c "echo '$nginx_conf_contents' > $nginx_conf_path"
|
||||||
|
sudo service nginx restart
|
||||||
|
fi
|
||||||
if [[ "$install_modsecurity" == "1" ]]; then
|
if [[ "$install_modsecurity" == "1" ]]; then
|
||||||
echo "Please modify your nginx conf file by yourself!"
|
echo "Please modify your nginx conf file by yourself!"
|
||||||
echo "
|
echo "
|
||||||
|
@ -296,12 +303,5 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
if [[ -z "$(grep -E 'include\s+\/etc\/nginx\/modules-enabled\/\*\.conf;' /etc/nginx/nginx.conf)" ]]; then
|
|
||||||
nginx_conf_path="/etc/nginx/nginx.conf"
|
|
||||||
nginx_conf_contents=`echo "$(echo 'include /etc/nginx/modules-enabled/*.conf;'; cat $nginx_conf_path)"`
|
|
||||||
sudo bash -l -c "echo '$nginx_conf_contents' > $nginx_conf_path"
|
|
||||||
sudo service nginx restart
|
|
||||||
fi
|
|
||||||
cd "$org_pwd"
|
cd "$org_pwd"
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue