Esempio n. 1
0
     exit(1);
 }
 /*
 echo "*** Tuning kernel ***\n";
 tuneKernel();
 */
 echo "*** Installing fossology ***\n";
 if (!installFossology($Ubuntu)) {
     echo "FATAL! Could not install fossology on {$distros[0]} version {$ubunVersion}\n";
     exit(1);
 }
 echo "*** stopping scheduler ***\n";
 // Stop scheduler so system files can be configured.
 //$testUtils->stopScheduler();
 echo "*** Setting up config files ***\n";
 if (configDebian($distros[0], $ubunVersion) === FALSE) {
     echo "FATAL! could not configure postgres or php config files\n";
     exit(1);
 }
 /*
  echo "*** Checking apache config ***\n";
  if(!configApache2($distros[0]))
  {
  echo "Fatal, could not configure apache2 to use fossology\n";
  }
  
 if(!restart('apache2'))
 {
   echo "Erorr! Could not restart apache2, please restart by hand\n";
   exit(1);
 }
Esempio n. 2
0
            exit(1);
        }
        break;
    case 'Ubuntu':
        $distro = 'Ubuntu';
        $ubunVersion = $distros[1];
        echo "Ubuntu version is:{$ubunVersion}\n";
        try {
            $Ubuntu = new ConfigSys($distros[0], $ubunVersion);
        } catch (Exception $e) {
            echo "FATAL! could not process ini file for Ubuntu {$ubunVersion} system\n";
            echo $e . "\n";
            exit(1);
        }
        echo "*** Configure fossology ***\n";
        if (!configDebian($distros[0], $ubunVersion)) {
            echo "FATAL! Could not config fossology on {$distros[0]} version {$ubunVersion}\n";
            exit(1);
        }
        break;
    default:
        echo "Fatal! unrecognized distribution! {$distros[0]}\n";
        exit(1);
        break;
}
class ConfigSys
{
    public $osFlavor;
    public $osVersion = 0;
    private $fossVersion;
    private $osCodeName;