Tout pour IparI

This commit is contained in:
Michael RICOIS 2014-12-05 12:57:14 +00:00
parent 105aced829
commit b2ba2f230e
5 changed files with 26 additions and 214 deletions

View File

@ -1,92 +0,0 @@
<?php
define('INCLUDE_PATH', realpath(dirname(__FILE__)).'/');
/** BATCH **/
define('FILLER',' ');
define('VERSION_FICHIER_BODACC','0106');
define('LONGUEUR_LIGNE_SORTIE', 2000);
/** Paramétres du FTP des JO **/
define('BODACC_FTP_URL', 'ftp.journal-officiel.gouv.fr');
define('BODACC_FTP_USER', 'SCORE');
define('BODACC_FTP_PASS', 'SD075');
define('BODACC_LOCAL_DIR', '/home/data/bodacc/');
define('JAL_LOCAL_DIR', '/home/data/jal/');
/** Paramétres du FTP de Hugin : Communiqués de presse **/
define('HUGIN_FTP_URL', 'ftp.companynews.fr');
define('HUGIN_FTP_USER', 'scores');
define('HUGIN_FTP_PASS', 'scores_632');
define('HUGIN_LOCAL_DIR', '/home/data/infosreg/hugin/');
/** Paramétres du FTP de ActusNews : Communiqués de presse **/
define('ACTUSNEWS_FTP_URL', 'ftp.actusnews.com');
define('ACTUSNEWS_FTP_USER', 'scores_act');
define('ACTUSNEWS_FTP_PASS', '6_etIwL');
define('ACTUSNEWS_LOCAL_DIR', '/home/data/infosreg/actusnews/');
/** Paramétres du FTP de Di Release : Communiqués de presse **/
define('DIRELEASE_FTP_URL', 'ftp.actusnews.com');
define('DIRELEASE_FTP_USER', 'scores_dir');
define('DIRELEASE_FTP_PASS', '-gT52sQ');
define('DIRELEASE_LOCAL_DIR', '/home/data/infosreg/direlease/');
/** Paramétres du FTP des Echos: Communiqués de presse **/
define('LESECHOS_FTP_URL', 'ftp.webdisclosure.com');
define('LESECHOS_FTP_USER', 'Scores');
define('LESECHOS_FTP_PASS', 'scores2001');
define('LESECHOS_LOCAL_DIR', '/home/data/infosreg/lesechos/');
/** Paramétres du FTP de BusinessWire : Communiqués de presse **/
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/data/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/data/infosreg/businesswire/');
/** Base de données de S&D **/
define ('MYSQL_HOST', '192.168.3.30');//3');
define ('MYSQL_USER', 'wsuser');
define ('MYSQL_PASS', 'wspass2012');
define ('MYSQL_DEFAULT_DB', 'jo');
define ('MYSQL_SQL_LOG', 'NONE');
define ('SPHINX_HOST', '192.168.3.32');
define ('SPHINX_PORT', 9312);
define ('SPHINX_ENT_HOST', '192.168.3.32');
define ('SPHINX_ENT_PORT', 9312);
define ('SPHINX_DIR_HOST', '192.168.3.32');
define ('SPHINX_DIR_PORT', 9312);
define ('SPHINX_ACT_HOST', '192.168.3.25');
define ('SPHINX_ACT_PORT', 3312);
define ('SPHINX_HISTO_HOST', '192.168.3.25');
define ('SPHINX_HISTO_PORT', 3312);
/** SERVEUR DE MESSAGERIE **/
define ('SMTP_HOST', 'smtp.celeste.fr');
define ('SMTP_PORT', 25);
define ('SMTP_USER', '');
define ('SMTP_PASS', '');
/** INFOGREFFE **/
define('INFOGREFFE_DISPO', true);
define('INFOGREFFE_DISPO_WS', true);
define('INFOGREFFE_DISPO_WEB', true);
define('INFOGREFFE_WS_URL', 'https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE');
define('INFOGREFFE_WS_URI', 'https://webservices.infogreffe.fr/');
define('INFOGREFFE_WS_USER', '85000109');
define('INFOGREFFE_WS_PASS', '166');
/** AMABIS **/
define('AMABIS_WS_URL', 'http://sw4.amabis.com:5101');
define('AMABIS_WS_URI', 'http://sw4.amabis.com:5101');
/** Dossiers locaux pour les documents a telecharger (PDF kbis, marques, etc...) **/
define ('DOC_WEB_LOCAL', '/home/vhosts/data/');
define ('DOC_WEB_URL', '/data/');
/** LOGGING **/
define('LOG_PATH', '/home/vhosts/data/log');

View File

@ -14,15 +14,14 @@ options :
}
$action = $argv[1];
$mode = strtoupper($argv[2]);
$hostname = exec('echo $(hostname)');
$profil = strtoupper($argv[2]);
switch ($action)
{
case '--install':
//Création de la configuration
echo "Ecriture de la configuration\n";
writeConfig();
writeConfig($profil);
echo "Changement des permissions\n";
changePermission();
break;
@ -44,17 +43,13 @@ function isRoot()
function changePermission()
{
require_once realpath(dirname(__FILE__)).'/../includes/config.php';
if (!file_exists(realpath(dirname(__FILE__).'/../html/data')))
passthru('ln -vs '.DOC_WEB_LOCAL.' '.realpath(dirname(__FILE__).'/../html/data'));
passthru('chown -R www-data: '.realpath(dirname(__FILE__).'/../'));
passthru('chmod -R +x '.realpath(dirname(__FILE__).'/../batch/').'/*.php');
}
function writeConfig()
function writeConfig($profil)
{
global $hostname;
passthru('cp -v '.realpath(dirname(__FILE__)).'/'.$hostname.'/config.php '.realpath(dirname(__FILE__)).'/../includes/config.php');
passthru('cp -v '.realpath(dirname(__FILE__)).'/'.$profil.'/config.php '.realpath(dirname(__FILE__)).'/../includes/config.php');
}

View File

@ -1,13 +1,13 @@
<?
define('INCLUDE_PATH', realpath(dirname(__FILE__)).'/');
/** BATCH
**/
define('FILLER',' ');
define('VERSION_FICHIER_BODACC','0106');
define('LONGUEUR_LIGNE_SORTIE', 2000);
/** Paramétres du FTP des JO
**/
define('BODACC_FTP_URL', 'ftp.journal-officiel.gouv.fr');
@ -22,7 +22,7 @@
define('HUGIN_FTP_USER', 'scores');
define('HUGIN_FTP_PASS', 'scores_632');
define('HUGIN_LOCAL_DIR', '/home/data/infosreg/hugin/');
/** Paramétres du FTP de ActusNews : Communiqués de presse
**/
define('ACTUSNEWS_FTP_URL', 'ftp.actusnews.com');
@ -36,7 +36,7 @@
define('DIRELEASE_FTP_USER', 'scores_dir');
define('DIRELEASE_FTP_PASS', '-gT52sQ');
define('DIRELEASE_LOCAL_DIR', '/home/data/infosreg/direlease/');
/** Paramétres du FTP des Echos: Communiqués de presse
**/
define('LESECHOS_FTP_URL', 'ftp.webdisclosure.com');
@ -44,37 +44,37 @@
define('LESECHOS_FTP_PASS', 'scores2001');
define('LESECHOS_LOCAL_DIR', '/home/data/infosreg/lesechos/');
/*Directory : syndication*/
/** Paramétres du FTP de BusinessWire : Communiqués de presse
**/
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/data/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/data/infosreg/businesswire/');
/** Base de données de S&D
**/
define ('MYSQL_HOST', '192.168.3.30');
define ('MYSQL_USER', 'wsuser');
define ('MYSQL_PASS', 'wspass2012');
define ('MYSQL_DEFAULT_DB', 'jo');
define ('MYSQL_SQL_LOG', 'NONE');
define ('SPHINX_HOST', '192.168.3.32');
define ('SPHINX_HOST', '192.168.3.25');
define ('SPHINX_PORT', 9312);
define ('SPHINX_ENT_HOST', '192.168.3.32');
define ('SPHINX_ENT_HOST', '192.168.3.25');
define ('SPHINX_ENT_PORT', 9312);
define ('SPHINX_DIR_HOST', '192.168.3.25');
define ('SPHINX_DIR_PORT', 3312);
define ('SPHINX_ACT_HOST', '192.168.3.25');
define ('SPHINX_ACT_PORT', 3312);
define ('SPHINX_HISTO_HOST', '192.168.3.25');
define ('SPHINX_HISTO_PORT', 3312);
/** SERVEUR DE MESSAGERIE
**/
define ('SMTP_HOST', 'smtp.celeste.fr');
@ -82,7 +82,7 @@
define ('SMTP_PORT', 25);
define ('SMTP_USER', '');
define ('SMTP_PASS', '');
/** INFOGREFFE
**/
define('INFOGREFFE_DISPO', true);
@ -94,17 +94,17 @@
// Ancienne IP : 194.5.120.108
define('INFOGREFFE_WS_USER', '85000109');
define('INFOGREFFE_WS_PASS', '166');
/** AMABIS
**/
define('AMABIS_WS_URL', 'http://sw4.amabis.com:5101');
define('AMABIS_WS_URI', 'http://sw4.amabis.com:5101');
/** Dossiers locaux pour les documents a telecharger (PDF kbis, marques, etc...) **/
define ('DOC_WEB_LOCAL', '/var/www/html/ws/data/');
define ('DOC_WEB_URL', '/data/');
define ('DOC_WEB_LOCAL', '');
define ('DOC_WEB_URL', '');
/** LOGGING **/
define('LOG_PATH', '/home/data/log');
define('LOG_PATH', '/home/vhosts/data/ws1');
?>

View File

@ -1,91 +0,0 @@
<?php
define('INCLUDE_PATH', realpath(dirname(__FILE__)).'/');
/** BATCH **/
define('FILLER',' ');
define('VERSION_FICHIER_BODACC','0106');
define('LONGUEUR_LIGNE_SORTIE', 2000);
/** Paramétres du FTP des JO **/
define('BODACC_FTP_URL', 'ftp.journal-officiel.gouv.fr');
define('BODACC_FTP_USER', 'SCORE');
define('BODACC_FTP_PASS', 'SD075');
define('BODACC_LOCAL_DIR', '/home/data/bodacc/');
define('JAL_LOCAL_DIR', '/home/data/jal/');
/** Paramétres du FTP de Hugin : Communiqués de presse **/
define('HUGIN_FTP_URL', 'ftp.companynews.fr');
define('HUGIN_FTP_USER', 'scores');
define('HUGIN_FTP_PASS', 'scores_632');
define('HUGIN_LOCAL_DIR', '/home/data/infosreg/hugin/');
/** Paramétres du FTP de ActusNews : Communiqués de presse **/
define('ACTUSNEWS_FTP_URL', 'ftp.actusnews.com');
define('ACTUSNEWS_FTP_USER', 'scores_act');
define('ACTUSNEWS_FTP_PASS', '6_etIwL');
define('ACTUSNEWS_LOCAL_DIR', '/home/data/infosreg/actusnews/');
/** Paramétres du FTP de Di Release : Communiqués de presse **/
define('DIRELEASE_FTP_URL', 'ftp.actusnews.com');
define('DIRELEASE_FTP_USER', 'scores_dir');
define('DIRELEASE_FTP_PASS', '-gT52sQ');
define('DIRELEASE_LOCAL_DIR', '/home/data/infosreg/direlease/');
/** Paramétres du FTP des Echos: Communiqués de presse **/
define('LESECHOS_FTP_URL', 'ftp.webdisclosure.com');
define('LESECHOS_FTP_USER', 'Scores');
define('LESECHOS_FTP_PASS', 'scores2001');
define('LESECHOS_LOCAL_DIR', '/home/data/infosreg/lesechos/');
/** Paramétres du FTP de BusinessWire : Communiqués de presse **/
define('BUSINESSWIRE_LOCAL_DIR_INCOMING', '/home/data/ftp/businesswire/');
define('BUSINESSWIRE_LOCAL_DIR', '/home/data/infosreg/businesswire/');
/** Base de données de S&D **/
define ('MYSQL_HOST', '192.168.78.230');
define ('MYSQL_USER', 'wsuser');
define ('MYSQL_PASS', 'scores');
define ('MYSQL_DEFAULT_DB', 'jo');
define ('MYSQL_SQL_LOG', 'NONE');
define ('SPHINX_HOST', '192.168.3.32');
define ('SPHINX_PORT', 9312);
define ('SPHINX_ENT_HOST', '192.168.3.32');
define ('SPHINX_ENT_PORT', 9312);
define ('SPHINX_DIR_HOST', '192.168.3.32');
define ('SPHINX_DIR_PORT', 9312);
define ('SPHINX_ACT_HOST', '192.168.3.32');
define ('SPHINX_ACT_PORT', 9312);
define ('SPHINX_HISTO_HOST', '192.168.3.32');
define ('SPHINX_HISTO_PORT', 9312);
/** SERVEUR DE MESSAGERIE **/
define ('SMTP_HOST', 'smtp.free.fr');
define ('SMTP_PORT', 25);
define ('SMTP_USER', '');
define ('SMTP_PASS', '');
/** INFOGREFFE **/
define('INFOGREFFE_DISPO', true);
define('INFOGREFFE_DISPO_WS', true);
define('INFOGREFFE_DISPO_WEB', true);
define('INFOGREFFE_WS_URL', 'https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE');
define('INFOGREFFE_WS_URI', 'https://webservices.infogreffe.fr/');
define('INFOGREFFE_WS_USER', '85000109');
define('INFOGREFFE_WS_PASS', '166');
/** AMABIS **/
define('AMABIS_WS_URL', 'http://sw4.amabis.com:5101');
define('AMABIS_WS_URI', 'http://sw4.amabis.com:5101');
/** Dossiers locaux pour les documents a telecharger (PDF kbis, marques, etc...) **/
define ('DOC_WEB_LOCAL', '/sites/dataws/');
define ('DOC_WEB_URL', '/data/');
/** LOGGING **/
define('LOG_PATH', '/sites/dataws/log');