Update nodemgmt-scripts.sh

This commit is contained in:
2022-10-14 23:15:30 -05:00
parent 6a1fa24f84
commit f3d204bf34

View File

@@ -1419,19 +1419,13 @@ SERVICE(){
if [ "${checkhost}" != "false" ]; then
#$NCMD mount -a
if [ "${3}" != "q" ]; then
IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
echo "IP $IP"
for NTYPE in "${NODE_TYPES[@]}"; do
echo "Node type: ${NTYPE}"
done
echo "Node type: ${NODE_TYPE}"
if [ "$NODE_TYPE" = "NC" ]; then
mntpath=`ls -l /mnt/Nextcloud-Data | wc -l`
elif [ "$NODE_TYPE" = "WEB" ]; then
mntpath=`ls -l /mnt/web-data | wc -l`
if [[ "${NCHOSTS}" == *"${nip}"* ]]; then
mntpath="/mnt/Nextcloud-Data"
if [[ "${WEBHOSTS}" == *"${nip}"* ]]; then
mntpath="/mnt/web-data"
fi
echo "Files found: ${mntpath}"
mntpathcnt=`ls -l ${mntpath} | wc -l`
echo "Files found in ($mntpath): ${mntpathcnt}"
if [ $var -gt 2 ]; then
echo -e "${idsCL[Green]}MOUNTED${idsCL[Default]}"
else