Преглед на файлове

dorzucenie /Library/Server/Web/Data/Sites/SE-production-git/SE/config/.config_base_structure.php - TODO nie znam nazw zwmiennych sciezek

a.binder преди 8 години
родител
ревизия
754fcf7f4f
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      SE/se-lib/Route/Install.php

+ 6 - 0
SE/se-lib/Route/Install.php

@@ -635,6 +635,8 @@ jQuery(document).ready(function () {
 		$this->_assertRsaKeyExists($appLicenceInfo);
 		$sshHostUsr = "{$appLicenceInfo->rootLogin}@{$appLicenceInfo->mainServer}";
 		$sshArgs = (22 != $appLicenceInfo->sshPort)? "-p {$appLicenceInfo->sshPort}" : '';
+		$scpArgs = (22 != $appLicenceInfo->sshPort)? "-P {$appLicenceInfo->sshPort}" : '';
+		 
 		$rsyncSshPort = (22 != $appLicenceInfo->sshPort)? "-e 'ssh -p {$appLicenceInfo->sshPort}'" : '';
 		
 		
@@ -665,6 +667,8 @@ jQuery(document).ready(function () {
 		$sshHostUsr = "{$appLicenceInfo->rootLogin}@{$appLicenceInfo->mainServer}";
 		$sshArgs = (22 != $appLicenceInfo->sshPort)? "-p {$appLicenceInfo->sshPort}" : '';
 		$rsyncSshPort = (22 != $appLicenceInfo->sshPort)? "-e 'ssh -p {$appLicenceInfo->sshPort}'" : '';
+		$scpArgs = (22 != $appLicenceInfo->sshPort)? "-P {$appLicenceInfo->sshPort}" : '';
+
 		// $appLicenceInfo->sshPort
 		/* rsync options:
 			-a, --archive               archive mode; same as -rlptgoD (no -H)
@@ -692,6 +696,8 @@ rsync --archive --times --delete --compress --one-file-system --omit-dir-times -
 ssh {$sshArgs} {$this->sshArgsSkipHostKey} {$sshHostUsr} 'cp -r /Library/Server/Web/Data/Sites/Default/SE/config ~/se.encrypted.upgrade/SE/';
 ssh {$sshArgs} {$this->sshArgsSkipHostKey} {$sshHostUsr} 'rm /Library/Server/Web/Data/Sites/Default/se.encrypted.upgrade'
 ssh {$sshArgs} {$this->sshArgsSkipHostKey} {$sshHostUsr} 'ln -s ~/se.encrypted.upgrade/SE /Library/Server/Web/Data/Sites/Default/se.encrypted.upgrade'
+scp {$this->sshArgsSkipHostKey}  {$scpArgs} /Library/Server/Web/Data/Sites/SE-production-git/SE/config/.config_base_structure.php {$sshHostUsr}:
+ssh {$sshArgs} {$this->sshArgsSkipHostKey} {$sshHostUsr} 'mv ~/.config_base_structure.php /Library/Server/Web/Data/Sites/Default/se.encrypted.upgrade/config'
 		"; //todo rsync ... -e \"{$this->sshArgsSkipHostKey}\" - maybe not working
 		V::exec("$cmd 2>&1", $out, $ret);
 		DBG::log([ 'cmd-remote' => $cmd, 'output' => $out ], 'array', "return: {$ret}");