Replace tree with find command

This commit is contained in:
cytopia 2020-11-12 15:03:57 +01:00
parent 760d1606c5
commit d727835228
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2

View File

@ -496,7 +496,7 @@ while read -r project; do
RET_CODE=$(( RET_CODE + 1))
DATA_DIR_PERM_WRONG=1
fi
done < <(tree "${HOST_PATH_HTTPD_DATADIR}" -L 1 -d -f -i -n --noreport)
done < <(find "${HOST_PATH_HTTPD_DATADIR}" -type d | grep -Ev "${HOST_PATH_HTTPD_DATADIR}/.+/.+")
if [ "${DATA_DIR_PERM_WRONG}" = "0" ]; then
log_ok "All project dirs have correct permissions"
fi
@ -509,7 +509,7 @@ while read -r project; do
RET_CODE=$(( RET_CODE + 1))
DATA_DIR_PERM_WRONG=1
fi
done < <(tree "${HOST_PATH_HTTPD_DATADIR}" -L 1 -d -f -i -n --noreport)
done < <(find "${HOST_PATH_HTTPD_DATADIR}" -type d | grep -Ev "${HOST_PATH_HTTPD_DATADIR}/.+/.+")
if [ "${DATA_DIR_PERM_WRONG}" = "0" ]; then
log_ok "All project dirs have correct uid"
fi
@ -522,7 +522,7 @@ while read -r project; do
RET_CODE=$(( RET_CODE + 1))
DATA_DIR_PERM_WRONG=1
fi
done < <(tree "${HOST_PATH_HTTPD_DATADIR}" -L 1 -d -f -i -n --noreport)
done < <(find "${HOST_PATH_HTTPD_DATADIR}" -type d | grep -Ev "${HOST_PATH_HTTPD_DATADIR}/.+/.+")
if [ "${DATA_DIR_PERM_WRONG}" = "0" ]; then
log_ok "All project dirs have correct gid"
fi