Update nodemgmt-scripts.sh
This commit is contained in:
@@ -61,15 +61,24 @@ STATUS() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
NEWCERT(){
|
NEWCERT(){
|
||||||
echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${1}${idsCL[LightGreen]}'...${idsCL[Default]}"
|
|
||||||
echo ""
|
echo ""
|
||||||
do_with_root $CERT_DAEMON certonly --webroot -w /var/www/html -d ${1}
|
NEW_CERT=${1}
|
||||||
|
if [ -z ${NEW_CERT+x} ]; then
|
||||||
|
echo -e -n "${idsCL[LightCyan]}Create certificate for what address: ${idsCL[Default]}"
|
||||||
|
read NEW_CERT
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${NEW_CERT}${idsCL[LightGreen]}'...${idsCL[Default]}"
|
||||||
|
echo ""
|
||||||
|
do_with_root $CERT_DAEMON certonly --webroot -w /var/www/html -d ${NEW_CERT}
|
||||||
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[LightYellow]}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
echo -e "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
||||||
echo ""
|
echo ""
|
||||||
sleep 20
|
sleep 20
|
||||||
SERVICE nginx reload
|
SERVICE nginx reload
|
||||||
|
echo -e "${idsCL[Green]}Certificate has been created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Green]}'...${idsCL[Default]}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CERTRENEW(){
|
CERTRENEW(){
|
||||||
|
|||||||
Reference in New Issue
Block a user