Blame view

bin/fetchFederationMetadata.php 842 Bytes
e2d01488a   Esmeralda Pires   1ºVersão
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
  #!/usr/bin/env php
  <?php
  
  define('SCRIPTPATH', (dirname(__FILE__)));
  define('BASEPATH', dirname(dirname(dirname(dirname(__FILE__)))));
  
  require(SCRIPTPATH.'/../config/config.php');
  
  $command = BASEPATH.'/modules/metarefresh/bin/metarefresh.php  -o='.$destinationgenerated.' --validate-fingerprint=' . $fingerprint . ' ' . $metadatasource . ' >'.BASEPATH.'/log/'.$logdestination;
  exec($command, $output, $exitCode);
  if ($exitCode != 0) {
  	echo($output[0]);
  	exit($exitCode);
  }
  
  exec(SCRIPTPATH.'/mergeMetadata.php', $output, $exitCode);
  if ($exitCode != 0) {
  	echo($output[0]);
  	exit($exitCode);
  }
  
  exec(SCRIPTPATH.'/checkMergedMetadata.php', $output, $exitCode);
  if ($exitCode != 0) {
  	echo($output[0]);
  	exit($exitCode);
  }
  
  rename(BASEPATH.'/'.$destinationgenerated.'/saml20-sp-merged.php', BASEPATH.'/metadata/'.$destination);
  exit(0);
  
  ?>