subst IP4 into nginx.conf

This commit is contained in:
Asif Bacchus 2019-01-05 05:24:23 -07:00
parent 2468418a64
commit 8b329a9f7b
2 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,7 @@
-1,
-1,
-1,
563
553
]
}
]

View File

@ -49,6 +49,8 @@ file_ssl="nginx/snippets/ssl/ssl_certs.conf"
tag_dhparam="<path/to/your_dhparam.pem>"
tag_cachain="<path/to/your_CA_bundle.crt>"
file_mozmodern="nginx/conf.d/mozModern_ssl.conf"
tag_lanip="<lanIP>"
file_lanip="nginx/nginx.conf"
file_buffers="nginx/conf.d/buffers.conf"
file_buffersPHP="nginx/conf.d/buffers_conf_php.insert"
tag_phphandler="#<insert PHP handler.*>$"
@ -549,6 +551,10 @@ echo "updating ${warn}${configPath}/${file_mozmodern}${norm}"
sed -i -e "s%${tag_dhparam}%${DHPath}%" "${configPath}/${file_mozmodern}"
sed -i -e "s%${tag_cachain}%${CAChainPath}%" "${configPath}/${file_mozmodern}"
# process LAN IP in nginx.conf
echo "updating ${warn}${configPath}/${file_lanip}${norm}"
sed -i "s/${tag_lanip}/${IP4}" "${configPath}/${file_lanip}"
# if using PHP: process buffers.conf
if [ "${usePHP}" -eq 1 ]; then
echo "updating ${warn}${configPath}/${file_buffers}${norm}"