Update nodemgmt-scripts.sh

This commit is contained in:
2019-04-03 19:50:07 -05:00
parent 2057219dce
commit 92d2fe548f

View File

@@ -369,12 +369,14 @@ NEWCERT(){
echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${NEW_CERT}${idsCL[LightGreen]}'...${idsCL[Default]}"
echo ""
echo -en "${idsCL[LightYellow]}Stopping other Webservers... ${idsCL[Default]}"
for nip in "${WEB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then
`ssh root@${nip} service nginx stop`
# SERVICE nginx stop ${nip}
fi
done
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
#$CERT_DAEMON certonly --webroot -w /var/www/html -d ${NEW_CERT}
$CERT_DAEMON certonly --dry-run --webroot -w /var/www/html -d ${NEW_CERT}
@@ -420,12 +422,16 @@ NEWCERT(){
echo ""
echo -e "${idsCL[Red]}Certificate could not be created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Red]}'...${idsCL[Default]}"
fi
echo -en "${idsCL[LightYellow]}Starting other Webservers... ${idsCL[Default]}"
for nip in "${WEB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then
`ssh root@${nip} service nginx start`
# SERVICE nginx start ${nip}
fi
done
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
echo ""
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true