Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-01 13:22:43 -06:00
parent 2097d70344
commit 3055fccccf

View File

@@ -224,8 +224,8 @@ case "$1" in
;;
set-permissions)
if [ "${1}" != "" ]; then
echo -e "${idsCL[Yellow]}Setting new site folder permissions for (/var/www/${1})${idsCL[Default]}"
if [ "${NEW_SITE}" != "" ]; then
echo -e "${idsCL[Yellow]}Setting new site folder permissions for (/var/www/${NEW_SITE})${idsCL[Default]}"
fi
nid=1
for nip in "${NODE_HOSTS[@]}"
@@ -236,10 +236,10 @@ case "$1" in
else
NCMD="ssh root@${nip}"
fi
if [ "${1}" != "" ]; then
if [ "${NEW_SITE}" != "" ]; then
echo -en "${idsCL[Cyan]}iDS-Node{nid} (${nip}) ${idsCL[Default]}"
${NCMD} chown -R www-data:www-data /var/www/${1}
${NCMD} chmod -R 7775 /var/www/${1}
${NCMD} chown -R www-data:www-data /var/www/${NEW_SITE}
${NCMD} chmod -R 7775 /var/www/${NEW_SITE}
echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
else
echo -e "${idsCL[Yellow]}Setting folder permissions for iDS-Node{nid} (${nip})${idsCL[Default]}"
@@ -263,7 +263,7 @@ case "$1" in
fi
nid=`expr $nid + 1`
done
if [ "${1}" != "" ]; then echo ""; fi
if [ "${NEW_SITE}" != "" ]; then echo ""; fi
;;
*)