forked from CMSCompOps/SiteReadiness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_local.sh
executable file
·38 lines (32 loc) · 1.35 KB
/
run_local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# Script to run a secondary version of the SR script when the main script fails:
# acronjob in acrontab jartieda
# 38 0,6,12,18 * * * lxplus /afs/cern.ch/user/j/jartieda/SiteSupportFiles/SiteReadiness/run_local.sh &> /dev/null
# 43 * * * * lxplus ssh vocms202 cp -a $HOME/www/SR2/. /afs/cern.ch/cms/LCG/www/sreadiness/SiteReadiness/ &> /dev/null
# 43 * * * * lxplus ssh vocms202 cp -a $HOME/www/SR2/. /afs/cern.ch/cms/LCG/www/sreadiness/CommLinksReports/ &> /dev/null
webdir=$HOME/www/readiness
webofficial=/afs/cern.ch/cms/LCG/www/sreadiness/SiteReadiness
webofficial2=/afs/cern.ch/cms/LCG/www/sreadiness/CommLinksReports
link=http://cms-site-readiness.web.cern.ch/cms-site-readiness
css=css/
input=input/
# create directory if not exists
if [ ! -d $webdir/HTML/ ]; then
mkdir -p $webdir/HTML/
fi
# copy css files
cp $css/* $webdir/HTML/
# Active links
echo "*** EnabledLinksFromPhEDExDataSrv.py ***"
python EnabledLinksFromPhEDExDataSrv.py -p $webdir -u $link
# Site Readiness python
echo "*** SiteReadiness.py ***"
./SiteReadiness.py -p $webdir -u $link -i $input
# $link: address to use inside files for output links
# Usable sites for analysis
echo "*** UsableSites.py ***"
python UsableSites.py -p $webdir -u $link
# copy all output files to web location
cp -a $webdir/. $webofficial/
cp -a $webdir/. $webofficial2/
echo "*** All copies completed ***"