Переглянути джерело

fixed Install to skip php version and exec bash_install_check after upgrade

Piotr Labudda 9 роки тому
батько
коміт
22e9a4ccd1
1 змінених файлів з 11 додано та 2 видалено
  1. 11 2
      SE/se-lib/Route/Install.php

+ 11 - 2
SE/se-lib/Route/Install.php

@@ -194,7 +194,7 @@ jQuery(document).ready(function () {
 		$installPath = $appLicenceInfo->installPath;
 		if (empty($installPath)) throw new Exception("Install path not found");
 
-		$phpVersion = '5.5';
+		$phpVersion = '5.6';
 
 		if ('1' == V::get('DBG_ENCODER_HELP', '', $_REQUEST)) {// encoder help
 			$cmd = "cd {$installPath}/SE && /Applications/SourceGuardian.app/Contents/MacOS/sgencoder --help ";
@@ -211,7 +211,8 @@ jQuery(document).ready(function () {
 			V::exec($cmd, $out, $ret);
 			DBG::_(true, true, "cmd: {$cmd} (return: {$ret})", $out, __CLASS__, __FUNCTION__, __LINE__);
 
-			$cmd = "cd {$installPath}/SE && /Applications/SourceGuardian.app/Contents/MacOS/sgencoder --phpversion {$phpVersion} -b- ";
+			// $cmd = "cd {$installPath}/SE && /Applications/SourceGuardian.app/Contents/MacOS/sgencoder --phpversion {$phpVersion} -b- ";
+			$cmd = "cd {$installPath}/SE && /Applications/SourceGuardian.app/Contents/MacOS/sgencoder -b- ";
 			//$mac = '38:c9:86:31:80:77';
 			//$cmd .= " --mac {$mac}";
 			foreach ($appLicenceInfo->domains as $domain) {
@@ -229,10 +230,12 @@ jQuery(document).ready(function () {
 			$phpFiles = array();
 			$skipPhpFiles = array();
 			$skipPhpFiles[] = 'bash_sync_perms.php';
+			$skipPhpFiles[] = 'bash_install_check.php';
 			$skipPhpFiles[] = '.config.php';
 			$skipPhpFiles[] = 'se-lib/V.php';
 			$skipPhpFiles[] = 'se-lib/Lib.php';
 			$skipPhpFiles[] = 'se-lib/DB.php';
+			$skipPhpFiles[] = 'se-lib/DBG.php';
 			$skipPhpFiles[] = 'se-lib/User.php';
 			$skipPhpFiles[] = 'se-lib/UserProfile.php';
 			$skipPhpFiles[] = 'se-lib/Config.php';
@@ -245,6 +248,7 @@ jQuery(document).ready(function () {
 			$skipPhpFiles[] = 'se-lib/Route/FixZasobPath.php';
 			//$skipPhpFiles[] = 'se-lib/Route/Install.php';
 			$skipPhpFiles[] = 'se-lib/Route/Msgs.php';
+			$skipPhpFiles[] = 'se-lib/Route/UrlAction/WmsGenerate.php';
 			$skipPhpFiles[] = 'superedit-DB_PROCEDURES_CREATE.php';
 			//$skipPhpFiles[] = '';
 
@@ -564,6 +568,11 @@ exit 0
 		V::execRootRemote($appLicenceInfo->mainServer, $appLicenceInfo->rootLogin, $appLicenceInfo->rootPassword, $cmd, $out, $ret, $appLicenceInfo->sshPort);
 		DBG::_(true, true, "cmd: {$cmd} (return: {$ret})", $out, __CLASS__, __FUNCTION__, __LINE__);
 		if (0 !== $ret) throw new Exception("Cannot run remote command as root! #{$ret}");
+
+		$cmd = "/usr/bin/php /Library/Server/Web/Data/Sites/Default/SE/bash_install_check.php";
+		V::execRootRemote($appLicenceInfo->mainServer, $appLicenceInfo->rootLogin, $appLicenceInfo->rootPassword, $cmd, $out, $ret, $appLicenceInfo->sshPort);
+		DBG::_(true, true, "cmd: {$cmd} (return: {$ret})", $out, __CLASS__, __FUNCTION__, __LINE__);
+		if (0 !== $ret) throw new Exception("Cannot run remote command as root! #{$ret}");
 	}
 
 	public function _assertRsaKeyExists($appLicenceInfo) {