Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
24477031
Commit
24477031
authored
May 28, 2015
by
Anton Agapov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The folder with gluster tool scripts is opened
parent
1420ea12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
glustercheck.sh
gluster/glustercheck.sh
+37
-0
No files found.
gluster/glustercheck.sh
0 → 100755
View file @
24477031
#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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment