Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1125,6 +1125,30 @@ SET-PERMISSIONS(){
|
|||||||
fi
|
fi
|
||||||
nid=`expr $nid + 1`
|
nid=`expr $nid + 1`
|
||||||
done
|
done
|
||||||
|
elif [ "${1}" = "nextcloud" ]; then
|
||||||
|
nid=1
|
||||||
|
for nip in "${NC_HOSTS[@]}"; do
|
||||||
|
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
|
||||||
|
NCMD=''
|
||||||
|
else
|
||||||
|
NCMD="ssh root@${nip}"
|
||||||
|
fi
|
||||||
|
if [ "${2}" != "q" ]; then
|
||||||
|
echo -en "${idsCL[Yellow]}Resetting folder permissions for Nextcloud on Nextcloud-Node${nid} (${nip})... ${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
checkhost=$(CHECK_HOST ${nip})
|
||||||
|
if [ "${checkhost}" != "false" ]; then
|
||||||
|
${NCMD} chown -R www-data:www-data /mnt/Nextcloud-Data
|
||||||
|
${NCMD} find /mnt/Nextcloud-Data/ -type d -exec chmod 750 {} \;
|
||||||
|
${NCMD} find /mnt/Nextcloud-Data/ -type f -exec chmod 640 {} \;
|
||||||
|
if [ "${2}" != "q" ]; then
|
||||||
|
echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
elif [ "${2}" != "q" ]; then
|
||||||
|
echo -e "${idsCL[Red]}Node is down${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
nid=`expr $nid + 1`
|
||||||
|
done
|
||||||
else
|
else
|
||||||
DIVIDER
|
DIVIDER
|
||||||
if [ "${1}" != "" ]; then
|
if [ "${1}" != "" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user