Commit ba54603f by Damien Moulard

ssa export data: resetup services.yaml config

parent 703a52ce
......@@ -22,6 +22,11 @@ parameters:
extra_security_admin_password: '%env(EXTRA_SECURITY_ADMIN_PASSWORD)%'
ccas_mode: '%env(CCAS_MODE)%'
use_external_data: '%env(USE_EXTERNAL_DATA)%'
export.ssh.host: '%env(EXPORT_SSH_HOST)%'
export.ssh.user: '%env(EXPORT_SSH_USER)%'
export.ssh.password: '%env(EXPORT_SSH_PASSWORD)%'
export.remote.path: '%env(EXPORT_REMOTE_PATH)%'
export.local.path: '%env(resolve:EXPORT_LOCAL_PATH)%'
# PARAMETRES DES IMPORTS POSSIBLE POUR L'APPLICATION DE GESTION DE MONNAIE LOCALE COMPLEMENTAIRE
......@@ -835,4 +840,12 @@ services:
arguments:
- '@session'
tags:
- { name: 'kernel.event_listener', event: 'security.interactive_login' }
\ No newline at end of file
- { name: 'kernel.event_listener', event: 'security.interactive_login' }
App\Command\ExportAndUploadDataCommand:
arguments:
$host: '%export.ssh.host%'
$user: '%export.ssh.user%'
$password: '%export.ssh.password%'
$remotePath: '%export.remote.path%'
$localPath: '%export.local.path%'
\ No newline at end of file
......@@ -26,16 +26,21 @@ class ExportAndUploadDataCommand extends Command
public function __construct(
CustomEntityManager $em,
LoggerInterface $logger
LoggerInterface $logger,
string $host,
string $user,
string $password,
string $remotePath,
string $localPath
) {
parent::__construct();
$this->em = $em;
$this->logger = $logger;
$this->host = $_ENV['EXPORT_SSH_HOST'];
$this->user = $_ENV['EXPORT_SSH_USER'];
$this->password = $_ENV['EXPORT_SSH_PASSWORD'];
$this->remotePath = $_ENV['EXPORT_REMOTE_PATH'];
$this->localPath = $_ENV['EXPORT_LOCAL_PATH'];
$this->host = $host;
$this->user = $user;
$this->password = $password;
$this->remotePath = $remotePath;
$this->localPath = $localPath;
}
protected function execute(InputInterface $input, OutputInterface $output): int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment