From f3d204bf34d2209aeb1a018a94ad3d95b92e111f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 14 Oct 2022 23:15:30 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index fa6420c5..9eb3431f 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -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