Commit 24477031 authored by Anton Agapov's avatar Anton Agapov

The folder with gluster tool scripts is opened

parent 1420ea12
#Directory checking on snail primary (both mounted and originals)
LIST=/root/failed
if [ $# -eq 0 ]
then
DIR="$(pwd)"
fi
if [ $# -eq 1 ]
then
DIR="$1"
fi
if [ $# -gt 1 ]
then
echo "The only arg is required, place your dir path with quotes"
exit 2
fi
if [[ "$DIR" =~ '/var/ftp' ]]
then
echo "Directory is OK, checking..."
else
echo "The dir is not in sub of /var/ftp. These paths are allowed only."
exit 1
fi
#stat ${DIR}/* 1>/dev/null 2>${LIST}
#FF=$(cat $FILE|grep -f4- -d' '|grep -f4 -d'/')
find "${DIR}" -depth -exec getfattr -h -n test {} \; &>/dev/null
for i in $(ls "$DIR")
do
stat "${DIR}/${i}" 1>/dev/null || ( rm -v "/var/local/eterglust/$(echo "${DIR}/${i}"|cut -f4- -d'/')" && ls "${DIR}/${i}" &>/dev/null && echo "Corrected successfully" )
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment