Update nodemgmt-scripts.sh

This commit is contained in:
2019-07-25 21:23:38 -05:00
parent 99cecddad6
commit 83675ea1b7

View File

@@ -1092,6 +1092,8 @@ NEWSITE(){
SET-PERMISSIONS(){ SET-PERMISSIONS(){
if [ "${1}" = "gitea" ]; then if [ "${1}" = "gitea" ]; then
for nip in "${WEB_HOSTS[@]}"; do for nip in "${WEB_HOSTS[@]}"; do
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
NCMD='' NCMD=''
else else
@@ -1107,6 +1109,7 @@ SET-PERMISSIONS(){
if [ "${2}" != "q" ]; then if [ "${2}" != "q" ]; then
echo -e "${idsCL[Green]}Complete${idsCL[Default]}" echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
fi fi
fi
done done
else else
DIVIDER DIVIDER
@@ -1116,8 +1119,9 @@ SET-PERMISSIONS(){
fi fi
if [ "${NEW_SITE}" = "xxx" ]; then if [ "${NEW_SITE}" = "xxx" ]; then
nid=1 nid=1
for nip in "${MYSQL_HOSTS[@]}" for nip in "${MYSQL_HOSTS[@]}"; do
do checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
NCMD='' NCMD=''
@@ -1130,12 +1134,14 @@ SET-PERMISSIONS(){
${NCMD} chmod -R 6775 /etc/letsencrypt ${NCMD} chmod -R 6775 /etc/letsencrypt
echo -e "${idsCL[Green]}Complete${idsCL[Default]}" echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
echo "" echo ""
fi
nid=`expr $nid + 1` nid=`expr $nid + 1`
done done
fi fi
nid=1 nid=1
for nip in "${WEB_HOSTS[@]}" for nip in "${WEB_HOSTS[@]}"; do
do checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
NCMD='' NCMD=''
@@ -1173,6 +1179,7 @@ SET-PERMISSIONS(){
echo -e "${idsCL[Green]}Complete${idsCL[Default]}" echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
echo "" echo ""
fi fi
fi
nid=`expr $nid + 1` nid=`expr $nid + 1`
done done
if [ "${NEW_SITE}" != "" ]; then echo ""; fi if [ "${NEW_SITE}" != "" ]; then echo ""; fi