sintonia/install/airtime-install.php

56 lines
1.7 KiB
PHP
Raw Normal View History

2010-11-04 23:01:31 +01:00
<?php
/**
* @package Airtime
2010-11-04 23:01:31 +01:00
* @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt
*/
echo "******************************** Install Begin *********************************".PHP_EOL;
2010-11-04 23:01:31 +01:00
require_once(dirname(__FILE__).'/include/installInit.php');
ExitIfNotRoot();
CreateINIFile();
UpdateINIFiles();
require_once(dirname(__FILE__).'/../application/configs/conf.php');
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
2011-03-09 06:44:51 +01:00
echo PHP_EOL."*** Database Installation ***".PHP_EOL;
2011-03-28 21:38:41 +02:00
echo "* Creating Airtime database user".PHP_EOL;
AirtimeInstall::CreateDatabaseUser();
2011-03-28 21:38:41 +02:00
echo "* Creating Airtime database".PHP_EOL;
AirtimeInstall::CreateDatabase();
AirtimeInstall::DbConnect(true);
2010-11-04 23:01:31 +01:00
2011-03-28 21:38:41 +02:00
echo "* Installing Postgresql scripting language".PHP_EOL;
AirtimeInstall::InstallPostgresScriptingLanguage();
2010-11-04 23:01:31 +01:00
2011-03-28 21:38:41 +02:00
echo "* Creating database tables".PHP_EOL;
AirtimeInstall::CreateDatabaseTables();
2011-03-28 21:38:41 +02:00
echo "* Storage directory setup".PHP_EOL;
AirtimeInstall::SetupStorageDirectory($CC_CONFIG);
2011-03-28 21:38:41 +02:00
echo "* Giving Apache permission to access the storage directory".PHP_EOL;
AirtimeInstall::ChangeDirOwnerToWebserver($CC_CONFIG["storageDir"]);
2010-11-04 23:01:31 +01:00
echo "* Creating /usr/bin symlinks".PHP_EOL;
AirtimeInstall::CreateSymlinks($CC_CONFIG["storageDir"]);
2011-03-28 21:38:41 +02:00
echo "* Importing sample audio clips".PHP_EOL;
2011-03-09 06:44:51 +01:00
system(__DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null");
echo PHP_EOL."*** Pypo Installation ***".PHP_EOL;
system("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py");
2011-03-09 06:44:51 +01:00
echo PHP_EOL."*** Recorder Installation ***".PHP_EOL;
system("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py");
2010-11-04 23:01:31 +01:00
2011-03-09 06:44:51 +01:00
echo "******************************* Install Complete *******************************".PHP_EOL;