Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
added a script to download a json file containing the global entity l…
…ist from the mdq-beta server
Showing
2 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
# inc-md-js | ||
## InCommon Metadata-Driven Web Pages | ||
|
||
This produces the web pages found at: | ||
<p>https://incommon.org/federation/info/all-entities.html</p> | ||
and | ||
<p>https://incommon.org/federation/info/all-entities-mdq-beta.html</p> | ||
It depends on a JSON feed of metadata produced by: | ||
<p>https://github.internet2.edu/InCommon/inc-md-json</p> | ||
At deploy-time, the symlink from 'metadata' needs to point to /usr/local/pkg/metadriven/metadata on the web server, which is where the JSON metadata files are maintained | ||
https://incommon.org/federation/info/all-entities.html and | ||
https://incommon.org/federation/info/all-entities-mdq-beta.html. | ||
|
||
|
||
The all-entities.html page depends on a JSON feed of metadata produced by: | ||
[https://github.internet2.edu/InCommon/inc-md-json](https://github.internet2.edu/InCommon/inc-md-json). | ||
At deploy-time, the symlink from 'metadata' needs to point to | ||
/usr/local/pkg/metadriven/metadata on the web server, which is where the JSON | ||
metadata files are maintained. | ||
|
||
|
||
The all-entities-mdq-beta.html depends on a JSON feed downloaded from | ||
[http://mdq-beta.incommon.org/global/x-entity-list](http://mdq-beta.incommon.org/global/x-entity-list). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
NOW=`date -u "+%Y%m%dT%H%M%S"` | ||
DIR="/home/htdocs/www.incommonfederation.org/federation/metadata_global" | ||
TARGET="${DIR}/entity-list-mdq-beta-${NOW}.json" | ||
SOURCE="${DIR}/entity-list-mdq-beta.json" | ||
URL="http://mdq-beta.incommon.org/global/x-entity-list" | ||
|
||
cleanup() { | ||
count=`ls ${DIR}/entity-list-mdq-beta-*T*.json | wc -l` | ||
|
||
if [[ $count -ge 5 ]] | ||
then | ||
for f in `ls ${DIR}/entity-list-mdq-beta-*T*.json |head -n $(($count - 3))` | ||
do | ||
rm $f | ||
done | ||
fi | ||
} | ||
|
||
cleanup | ||
|
||
/usr/bin/curl -s ${URL} -o ${TARGET} | ||
if [[ $? == 0 ]] | ||
then | ||
ln -fs ${TARGET} ${SOURCE} | ||
fi | ||
|