makeRemote
1.67 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
#
#
SCRIPT=$(readlink -f "$0")
export UPDATEDIR=$(dirname "$SCRIPT")
. $UPDATEDIR/updateEnv.sh
if [ ! -d "$AMDA_IHM" ]; then
echo "[ERROR] check if AMDA_IHM env variable is defined"
fi
#
# "AMDA side" ( IMPEX-like ) data centers
#
# check if Orbites.xml exists; if not create it !
if [ ! -f "$LocalData/OrbitsAll.xml" ]; then
php $AMDA_IHM/php/makeOrbitsList.php
php $AMDA_IHM/php/makeOrbitsInKm.php
fi
# make Proxies for 'isSimulation' dataCenters from Bases.xml
php $AMDA_IHM/php/RemoteDataCenter/makeProxy.php
# make [TARGET].json
php $AMDA_IHM/php/RemoteDataCenter/makeOrbitsArgs.php
# make help/simu/simu[TARGET]
php $AMDA_IHM/php/RemoteDataCenter/makeOrbitsInfo.php
# make template args
php $AMDA_IHM/php/RemoteDataCenter/makeArgs.php
if [ ! -f "$RemoteData/Bases.xml" ]; then
mkdir -m 775 -p $RemoteData
cp $AMDA_IHM/php/RemoteDataCenter/Bases.xml $RemoteData
fi
#
# "DDBASE side" ( CDAWEB-like ) data centers
#
if [ ! -d "$RemoteData/PARAMS" ]; then
mkdir -m 775 -p $RemoteData/PARAMS
fi
# group = apache !
sudo chmod -R g+wrx $RemoteData $RemoteData/PARAMS $PARAMS_LOCALDB_DIR
php $AMDA_IHM/php/RemoteDataCenter/getRemoteDDBaseProxies.php
# copy "DDBASE" Remote Params descriptions
if [ -d "$RemoteData/PARAMS" ]; then
# remove PARAMS if no such VI in the database
php $AMDA_IHM/php/RemoteDataCenter/cleanRemoteParams.php
for param_def in $RemoteData/PARAMS/*.xml
do
xml=`basename $param_def`
if [ ! -f "$PARAMS_LOCALDB_DIR/$xml" ]; then
#cp $param_def $PARAMS_LOCALDB_DIR/
ln -s $param_def $PARAMS_LOCALDB_DIR/$xml
fi
done
fi