update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
VERS='5.1.20-12122023'
|
||||
VERS='5.1.21-12132023'
|
||||
NM_BETA=false
|
||||
|
||||
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck '
|
||||
|
||||
@@ -63,7 +63,9 @@ NEWCERT(){
|
||||
echo -e "$(date +%Y-%m-%d-%H-%M-%S) - ${NEW_CERT}" >> ${NM_LOGFOLDER}/cert.requests
|
||||
if [ -f ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf ]; then
|
||||
sed -i "s/#ssl_certificate/ssl_certificate/g" ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf
|
||||
|
||||
sed -i "s/#listen 443/listen 443/g" ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf
|
||||
sed -i "s/#include conf.d\/include\/ssl-ciphers.conf/include conf.d\/include\/ssl-ciphers.conf/g" ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf
|
||||
sed -i "s/#include conf.d\/include\/force-ssl.conf/include conf.d\/include\/force-ssl.conf/g" ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf
|
||||
DIVIDER true
|
||||
if [ "${NEWSITE}" != "true" ]; then
|
||||
echo -e -n "${idsCL[LightCyan]}Restart NGINX on all Nodes (Y/n): ${idsCL[Default]}"
|
||||
|
||||
@@ -445,17 +445,19 @@ NEWPROXYSITE_CREATE(){
|
||||
|
||||
if [ "${SSL^^}" == "YES" ]; then
|
||||
echo -en "${idsCL[LightCyan]}Enabling SSL ... "
|
||||
sed -i "s/#ssl_certificate/ssl_certificate/g" ${nginxconfig}
|
||||
sed -i "s/#listen 443/listen 443/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/ssl-ciphers.conf/include conf.d\/include\/ssl-ciphers.conf/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/force-ssl.conf/include conf.d\/include\/force-ssl.conf/g" ${nginxconfig}
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||
echo
|
||||
if [ ! -f ${NM_CERTPATH}/live/${MAIN_SITE}/cert.pem ]; then
|
||||
echo -e "\n${idsCL[LightCyan]}No SSL cert detected, will generate one now ... "
|
||||
SERVICE_MGMT nginx restart
|
||||
NEWCERT ${CERTTEST}-newsite ${NGINX_SERVERNAME}
|
||||
echo
|
||||
else
|
||||
sed -i "s/#ssl_certificate/ssl_certificate/g" ${nginxconfig}
|
||||
sed -i "s/#listen 443/listen 443/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/ssl-ciphers.conf/include conf.d\/include\/ssl-ciphers.conf/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/force-ssl.conf/include conf.d\/include\/force-ssl.conf/g" ${nginxconfig}
|
||||
echo
|
||||
fi
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||
else
|
||||
echo -en "${idsCL[LightCyan]}Disabling SSL ... "
|
||||
sed -i "s/ssl_certificate/#ssl_certificate/g" ${nginxconfig}
|
||||
|
||||
Reference in New Issue
Block a user