UPDATE
This commit is contained in:
@@ -5,6 +5,7 @@ NODE_HOSTS=10.5.10.51,10.5.10.52,10.5.10.53
|
||||
NODE_SERVICES=mysql,nginx,gitea,haproxy,keepalived,maxscale
|
||||
CERT_DAEMON='/usr/bin/certbot'
|
||||
FOLDER=/opt/idssys/nodemgmt
|
||||
SCRIPT=${FOLDER}/nodemgmt-scripts.sh
|
||||
|
||||
IFS=,
|
||||
NODE_HOSTS=(${NODE_HOSTS})
|
||||
|
||||
@@ -69,7 +69,7 @@ NEWCERT(){
|
||||
echo -e "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
||||
echo ""
|
||||
sleep 20
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload
|
||||
SERVICE nginx reload
|
||||
}
|
||||
|
||||
CERTRENEW(){
|
||||
@@ -80,7 +80,7 @@ CERTRENEW(){
|
||||
echo -e "${idsCL${idsCL[LightYellow]}}Waiting for certifcate replication between the nodes...${idsCL[Default]}"
|
||||
echo ""
|
||||
sleep 20
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
SERVICE nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
}
|
||||
|
||||
NIGHTLYRENEW(){
|
||||
@@ -89,7 +89,7 @@ NIGHTLYRENEW(){
|
||||
do_with_root chown -R root:letsencrypt /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
do_with_root chmod -R 6775 /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
sleep 20
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload &>> /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
SERVICE nginx reload &>> /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
}
|
||||
|
||||
DELSITE(){
|
||||
@@ -127,7 +127,7 @@ DELSITE(){
|
||||
nid=`expr $nid + 1`
|
||||
done
|
||||
echo ""
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload
|
||||
SERVICE nginx reload
|
||||
echo -e "${idsCL[LightRed]}Site has been deleted.${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[LightRed]}No site was defined.${idsCL[Default]}"
|
||||
@@ -230,7 +230,7 @@ NEWSITE(){
|
||||
fi
|
||||
${NCMD} mkdir -p /var/www/${MAIN_SITE}/{public_folder,nginx_logs}
|
||||
done
|
||||
nodemgmt set-permissions ${MAIN_SITE}
|
||||
SET-PERMISSIONS ${MAIN_SITE}
|
||||
|
||||
else
|
||||
|
||||
@@ -266,9 +266,9 @@ NEWSITE(){
|
||||
fi
|
||||
ln -s /etc/nginx/sites-available/${MAIN_SITE}.conf /etc/nginx/sites-enabled/${MAIN_SITE}.conf
|
||||
if [ "${CREATE_SSL}" = "true" ]; then
|
||||
${FOLDER}/nodemgmt-scripts.sh newcert ${NEW_SITE}
|
||||
NEWCERT ${NEW_SITE}
|
||||
else
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload
|
||||
SERVICE nginx reload
|
||||
fi
|
||||
echo ""
|
||||
echo -e "${idsCL[LightGreen]}The new site for '${idsCL[LightGreen]}${NEW_SITE}${idsCL[Default]}' has been created.${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user