-check if user=root for propel-install script
This commit is contained in:
parent
d06956ec5b
commit
fe87d8957b
|
@ -17,9 +17,9 @@ if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
|
|||
function printUsage()
|
||||
{
|
||||
echo "\n";
|
||||
echo "campcaster-user\n";
|
||||
echo "airtime-user\n";
|
||||
echo "===============\n";
|
||||
echo " This program allows you to manage Campcaster users.\n";
|
||||
echo " This program allows you to manage Airtime users.\n";
|
||||
echo "\n";
|
||||
echo "OPTIONS:\n";
|
||||
echo " --addupdate <username> <password>\n";
|
||||
|
@ -99,4 +99,4 @@ if (PEAR::isError($r)) {
|
|||
die($r->getMessage());
|
||||
}
|
||||
exit(0);
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#!/bin/bash
|
||||
#-------------------------------------------------------------------------------
|
||||
# Copyright (c) 2010 Sourcefabric O.P.S.
|
||||
# Copyright (c) 2010 Airtime O.P.S.
|
||||
#
|
||||
# This file is part of the Campcaster project.
|
||||
# This file is part of the Airtime project.
|
||||
# http://campcaster.sourcefabric.org/
|
||||
# To report bugs, send an e-mail to bugs@campware.org
|
||||
#
|
||||
# Campcaster is free software; you can redistribute it and/or modify
|
||||
# Airtime is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Campcaster is distributed in the hope that it will be useful,
|
||||
# Airtime is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Campcaster; if not, write to the Free Software
|
||||
# along with Airtime; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Campcaster
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
|
@ -15,7 +15,6 @@ if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
echo "******************************* Install Begin ********************************\n";
|
||||
|
||||
require_once(dirname(__FILE__).'/../application/configs/conf.php');
|
||||
require_once(dirname(__FILE__).'/../application/models/GreenBox.php');
|
||||
|
@ -23,6 +22,12 @@ require_once(dirname(__FILE__).'/../application/models/GreenBox.php');
|
|||
require_once(dirname(__FILE__)."/installInit.php");
|
||||
|
||||
// Need to check that we are superuser before running this.
|
||||
if(exec("whoami") != "root"){
|
||||
echo "Must be root user.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
echo "******************************* Install Begin ********************************\n";
|
||||
|
||||
echo " *** Database Installation ***\n";
|
||||
|
||||
|
@ -201,7 +206,7 @@ install_setDirPermissions($CC_CONFIG["storageDir"]);
|
|||
//echo " Done.\n";
|
||||
|
||||
echo " * Importing sample audio clips \n";
|
||||
$command = __DIR__."/../utils/campcaster-import --copy ../audio_samples/ > /dev/null";
|
||||
$command = __DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null";
|
||||
@exec($command, $output, $results);
|
||||
echo "****************************** Install Complete ******************************\n";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Campcaster
|
||||
* @package Airtime
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
@ -236,4 +236,4 @@ echo "************************************\n";
|
|||
echo "* StorageServer Uninstall Complete *\n";
|
||||
echo "************************************\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue