Update nodemgmt-scripts.sh

This commit is contained in:
2020-04-07 17:20:34 -05:00
parent d4b306a4ef
commit 27db0d4b24

View File

@@ -1126,15 +1126,14 @@ SET-PERMISSIONS(){
nid=`expr $nid + 1` nid=`expr $nid + 1`
done done
elif [ "${1}" = "nextcloud" ]; then elif [ "${1}" = "nextcloud" ]; then
nid=1 nip=${NC_HOSTS[0]}
for nip in "${NC_HOSTS[@]}"; do
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
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
if [ "${2}" != "q" ]; then if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for Nextcloud on Nextcloud-Node${nid} (${nip})... ${idsCL[Default]}" echo -en "${idsCL[Yellow]}Resetting folder permissions for Nextcloud on Nextcloud-Node1 (${nip})... ${idsCL[Default]}"
fi fi
checkhost=$(CHECK_HOST ${nip}) checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then if [ "${checkhost}" != "false" ]; then
@@ -1147,8 +1146,6 @@ SET-PERMISSIONS(){
elif [ "${2}" != "q" ]; then elif [ "${2}" != "q" ]; then
echo -e "${idsCL[Red]}Node is down${idsCL[Default]}" echo -e "${idsCL[Red]}Node is down${idsCL[Default]}"
fi fi
nid=`expr $nid + 1`
done
else else
DIVIDER DIVIDER
if [ "${1}" != "" ]; then if [ "${1}" != "" ]; then