Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     //         $move = $input->getOption('move');
     //         $stop  = intval($input->getOption('stop'));
     //		try{
     $outputInterfaceLogger = new OutputInterfaceLogger($output);
     $dnsSynchronizer = new DNSSynchronizer($this->config);
     $dnsSynchronizer->setLogger($outputInterfaceLogger);
     $ptrDataAdapter = $this->config["data-adapter.ptr-records"];
     $dnsSynchronizer->createPTRRecords(new $ptrDataAdapter($this->config));
     //		}catch (SynKnotException $e){
     //         	echo $e->getMessage();
     //         }catch (Exception $e){
     //         	echo $e->getMessage();
     //         }
     // 		if($move){
     // 		}
     // 		$fileBuilder = new FileBuilder($this->config);
     //přesun nových záznamů
     // 		$fileBuilder->clearDirectory($this->config['path-ptr-backup']);
     // 		$fileBuilder->moveDirectory($this->config['path-ptr'], $this->config['path-ptr-backup']);
     // 		$fileBuilder->moveDirectory($this->config['path-ptr-tmp'], $this->config['path-ptr']);
     //přesun seznamu zónových souborů
     // 		$fileBuilder->saveContent($ptrBuilder->getZoneList(), $this->config['path-zones-ptr-tmp']);
     // 		$fileBuilder->moveFile($this->config['path-zones-ptr'], $this->config['path-zones-ptr-backup']);
     // 		$fileBuilder->moveFile($this->config['path-zones-ptr-tmp'], $this->config['path-zones-ptr']);
     $output->writeln('PTR records has been synchronized.');
 }