Blame view

update_amda/makeRemote 1.28 KB
4c77b9b1   Elena.Budnik   final update
1
2
3
4
5
#!/bin/bash

#
#   
#
99ae8744   Benjamin Renard   Use config variab...
6
7
8
9
10
11
12
   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
cba7eca7   Elena.Budnik   merge 2 parts of ...
13
14
15
16

#
#  "AMDA side" ( IMPEX-like ) data centers
#
4c77b9b1   Elena.Budnik   final update
17
18
   
	# check if Orbites.xml exists; if not create it !
99ae8744   Benjamin Renard   Use config variab...
19
	if [ ! -f "$LocalData/OrbitsAll.xml" ]; then   
4c77b9b1   Elena.Budnik   final update
20
21
22
23
24
25
26
27
28
29
		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
	
4f91dd57   Elena.Budnik   IMPEX update orbi...
30
31
32
	# make help/simu/simu[TARGET]
	php  $AMDA_IHM/php/RemoteDataCenter/makeOrbitsInfo.php
	
4c77b9b1   Elena.Budnik   final update
33
34
	# make template args
	php  $AMDA_IHM/php/RemoteDataCenter/makeArgs.php
d73734df   Elena.Budnik   add DDBASE Remote...
35
	
99ae8744   Benjamin Renard   Use config variab...
36
	if  [ ! -f "$RemoteData/Bases.xml" ]; then 
cb36b2fe   Elena.Budnik   proper dirs perms
37
		mkdir -m 775 -p $RemoteData
99ae8744   Benjamin Renard   Use config variab...
38
		cp $AMDA_IHM/php/RemoteDataCenter/Bases.xml $RemoteData
cba7eca7   Elena.Budnik   merge 2 parts of ...
39
40
41
42
43
	fi
	
#
#  "DDBASE side" ( CDAWEB-like ) data centers
#
410b9d9f   Elena.Budnik   chmod
44
	
410b9d9f   Elena.Budnik   chmod
45
46
47
	sudo chmod -R g+wrx $RemoteData
	sudo chmod -R g+wrx $PARAMS_LOCALDB_DIR
	
cb32ce86   Elena.Budnik   mkdir PATAMS in c...
48
49
	php $AMDA_IHM/php/RemoteDataCenter/getRemoteDDBaseProxies.php
	
d73734df   Elena.Budnik   add DDBASE Remote...
50
	# copy "DDBASE" Remote Params descriptions
99ae8744   Benjamin Renard   Use config variab...
51
52
	if [ -d "$RemoteData/PARAMS" ]; then
		cp $AMDA_IHM/generic_data/RemoteData/PARAMS/* $PARAMS_LOCALDB_DIR/
d73734df   Elena.Budnik   add DDBASE Remote...
53
	fi 
9b6c46d9   Elena.Budnik   THEMIS Remote center
54