Update nodemgmt-scripts.sh
This commit is contained in:
@@ -26,7 +26,7 @@ case "$1" in
|
|||||||
do_with_root $CERT_DAEMON certonly --webroot -w /var/www/html -d $2
|
do_with_root $CERT_DAEMON certonly --webroot -w /var/www/html -d $2
|
||||||
do_with_root chown -R root:letsencrypt /etc/letsencrypt
|
do_with_root chown -R root:letsencrypt /etc/letsencrypt
|
||||||
do_with_root chmod -R 6775 /etc/letsencrypt
|
do_with_root chmod -R 6775 /etc/letsencrypt
|
||||||
echo -e "${idsCL[LightGreen]}Waiting for Replication...${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
||||||
sleep 20
|
sleep 20
|
||||||
"$0" service nginx reload
|
"$0" service nginx reload
|
||||||
exit 0
|
exit 0
|
||||||
@@ -37,7 +37,7 @@ case "$1" in
|
|||||||
do_with_root $CERT_DAEMON renew --webroot -w /var/www/html 2>&1 | tee /opt/idssys/nodemgmt/cert-renewal.lastrun
|
do_with_root $CERT_DAEMON renew --webroot -w /var/www/html 2>&1 | tee /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||||
do_with_root chown -R root:letsencrypt /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
do_with_root chown -R root:letsencrypt /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||||
do_with_root chmod -R 6775 /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
do_with_root chmod -R 6775 /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||||
echo -e "${idsCL[LightGreen]}Waiting for Certificate Replication...${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
||||||
sleep 20
|
sleep 20
|
||||||
"$0" service nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
"$0" service nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||||
exit 0
|
exit 0
|
||||||
@@ -55,6 +55,7 @@ case "$1" in
|
|||||||
|
|
||||||
newsite)
|
newsite)
|
||||||
NEW_SITE=${2}
|
NEW_SITE=${2}
|
||||||
|
echo -e "${idsCL[LightGreen]}Setting up new site for '${idsCL[Yellow]}${NEW_SITE}${idsCL[LightGreen]}'...${idsCL[Default]}"
|
||||||
rm -f /etc/nginx/sites-available/${NEW_SITE}.conf
|
rm -f /etc/nginx/sites-available/${NEW_SITE}.conf
|
||||||
rm -rf /var/www/${NEW_SITE}
|
rm -rf /var/www/${NEW_SITE}
|
||||||
|
|
||||||
@@ -91,9 +92,14 @@ case "$1" in
|
|||||||
include conf.d/include/letsencrypt-acme-challenge.conf;
|
include conf.d/include/letsencrypt-acme-challenge.conf;
|
||||||
}
|
}
|
||||||
" > /etc/nginx/sites-available/${NEW_SITE}.conf
|
" > /etc/nginx/sites-available/${NEW_SITE}.conf
|
||||||
|
echo -e "${idsCL[LightGreen]}Waiting for folder replication between the nodes...${idsCL[Default]}"
|
||||||
|
sleep 20
|
||||||
nodemgmt set-permissions ${NEW_SITE}
|
nodemgmt set-permissions ${NEW_SITE}
|
||||||
nodemgmt newcert ${NEW_SITE}
|
nodemgmt newcert ${NEW_SITE}
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo -e "${idsCL[LightGreen]}The new site for '${idsCL[LightGreen]}${NEW_SITE}${idsCL[Default]}' has been created.${idsCL[Default]}"
|
||||||
|
echo ""
|
||||||
;;
|
;;
|
||||||
|
|
||||||
update)
|
update)
|
||||||
|
|||||||
Reference in New Issue
Block a user