Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Connectivity Check
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Connectivity Check
Commits
8146355b
Commit
8146355b
authored
4 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Fixed environment variables
parent
4c128d05
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+0
-2
0 additions, 2 deletions
README.md
cleanAndRunEccs2.sh
+34
-28
34 additions, 28 deletions
cleanAndRunEccs2.sh
with
34 additions
and
30 deletions
README.md
+
0
−
2
View file @
8146355b
...
...
@@ -181,11 +181,9 @@ Note: Pay attetion on the chromedriver version:
*
CentOS:
*
`vim $HOME/.bash_profile`
*
`PATH=$PATH:$HOME/.local/bin:$HOME/bin`
becomes
`PATH=$HOME/eccs2/eccs2venv/bin:$HOME/.local/bin:$HOME/bin:$PATH`
*
`source $HOME/.bash_profile`
*
Debian:
*
`vim $HOME/.profile`
*
`PATH="$HOME/bin:$PATH"`
becomes
`PATH="$HOME/eccs2/eccs2venv/bin:$HOME/bin:$PATH"`
*
`source $HOME/.bash_profile`
3.
Configure ECCS2 cron job for the local user:
*
`crontab -e`
...
...
This diff is collapsed.
Click to expand it.
cleanAndRunEccs2.sh
+
34
−
28
View file @
8146355b
...
...
@@ -4,6 +4,8 @@
BASEDIR
=
$HOME
source
$HOME
/.bash_profile
# Remove old IdP and Fed List
rm
-f
$BASEDIR
/eccs2/input/
*
.json
...
...
@@ -21,44 +23,48 @@ suffix="'"
eccs2output
=
"
$BASEDIR
/eccs2/output/eccs2_
$date
.log"
declare
-a
eccs2cmdToRemoveArray
if
[
-s
$file
]
;
then
if
[
-s
$eccsoutput
]
;
then
if
[
-s
$file
]
;
then
while
IFS
=
read
-r
line
do
string
=
$line
while
IFS
=
read
-r
line
do
string
=
$line
#remove "prefix" from the command string at the beginning.
prefix_removed_string
=
${
string
/#
$prefix
}
#remove "prefix" from the command string at the beginning.
prefix_removed_string
=
${
string
/#
$prefix
}
#remove "suffix" from the command string at the end.
suffix_removed_string
=
${
prefix_removed_string
/%
$suffix
}
#remove "suffix" from the command string at the end.
suffix_removed_string
=
${
prefix_removed_string
/%
$suffix
}
entityIDidp
=
$(
echo
"
$suffix_removed_string
"
| jq
'.entityID'
)
entityIDidp
=
$(
echo
"
$suffix_removed_string
"
| jq
'.entityID'
)
#remove start and end quotes from the entityIDidp to be able to use "grep"
entityIDidp
=
"
${
entityIDidp
:1
}
"
entityIDidp
=
"
${
entityIDidp
%?
}
"
#remove start and end quotes from the entityIDidp to be able to use "grep"
entityIDidp
=
"
${
entityIDidp
:1
}
"
entityIDidp
=
"
${
entityIDidp
%?
}
"
result
=
$(
grep
$entityIDidp
$eccs2output
|
wc
-l
)
result
=
$(
grep
$entityIDidp
$eccs2output
|
wc
-l
)
if
[[
"
$result
"
=
1
]]
;
then
eccs2cmdToRemoveArray+
=(
"
$entityIDidp
"
)
else
echo
"The result for the IdP '
$entityIDidp
' has been found multiple times on
$eccs2output
. It is wrong."
fi
if
[[
"
$result
"
=
1
]]
;
then
eccs2cmdToRemoveArray+
=(
"
$entityIDidp
"
)
else
echo
"The result for the IdP '
$entityIDidp
' has been found multiple times on
$eccs2output
. It is wrong."
fi
done
<
"
$file
"
done
<
"
$file
"
# Remove IdP command that had success from "failed-cmd.sh"
for
idpToRemove
in
${
eccs2cmdToRemoveArray
[@]
}
do
$(
grep
-v
$idpToRemove
$file
>
temp
;
mv
-f
temp
$file
)
done
fi
# Remove IdP command that had success from "failed-cmd.sh"
for
idpToRemove
in
${
eccs2cmdToRemoveArray
[@]
}
do
$(
grep
-v
$idpToRemove
$file
>
temp
;
mv
-f
temp
$file
)
done
if
[
-s
$file
]
;
then
echo
"
$date
- ECCS2 NOT OK: Some eduGAIN IdPs have remained unchecked. See the 'logs/failed-cmd.sh' and logs/stderr_
$date
.log files"
if
[
-s
$file
]
;
then
echo
"
$date
- ECCS2 NOT OK: Some eduGAIN IdPs have remained unchecked. See the 'logs/failed-cmd.sh' and logs/stderr_
$date
.log files"
else
echo
"
$date
- ECCS2 OK: All eduGAIN IdPs have been checked successfully"
fi
fi
else
echo
"
$date
-
ECCS2 OK: All eduGAIN IdPs have been checked successfully
"
echo
"
$date
-
Something went wrong and the ECCS2 check has not been executed
"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment