CC-2697: airtime-user script is not working
-added script to system path
This commit is contained in:
parent
e53c6d8061
commit
a47044c50c
|
@ -341,6 +341,10 @@ class AirtimeInstall
|
||||||
echo "* Installing airtime-check-system".PHP_EOL;
|
echo "* Installing airtime-check-system".PHP_EOL;
|
||||||
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-check-system";
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-check-system";
|
||||||
exec("ln -s $dir /usr/bin/airtime-check-system");
|
exec("ln -s $dir /usr/bin/airtime-check-system");
|
||||||
|
|
||||||
|
echo "* Installing airtime-user".PHP_EOL;
|
||||||
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-user";
|
||||||
|
exec("ln -s $dir /usr/bin/airtime-user");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function RemoveSymlinks()
|
public static function RemoveSymlinks()
|
||||||
|
|
|
@ -20,6 +20,14 @@ const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||||
class AirtimeInstall{
|
class AirtimeInstall{
|
||||||
|
|
||||||
const CONF_DIR_LOG = "/var/log/airtime";
|
const CONF_DIR_LOG = "/var/log/airtime";
|
||||||
|
const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||||
|
|
||||||
|
public static function CreateSymlinksToUtils()
|
||||||
|
{
|
||||||
|
echo "* Installing airtime-user".PHP_EOL;
|
||||||
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-user";
|
||||||
|
exec("ln -s $dir /usr/bin/airtime-user");
|
||||||
|
}
|
||||||
|
|
||||||
public static function CreateZendPhpLogFile(){
|
public static function CreateZendPhpLogFile(){
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# This script cleans audio files in Airtime.
|
# This script for a correct system environment for Airtime.
|
||||||
#
|
#
|
||||||
# Absolute path to this script
|
# Absolute path to this script
|
||||||
SCRIPT=`readlink -f $0`
|
SCRIPT=`readlink -f $0`
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2010 Sourcefabric O.P.S.
|
||||||
|
#
|
||||||
|
# This file is part of the Airtime project.
|
||||||
|
# http://airtime.sourcefabric.org/
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# 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 Airtime; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# This script creates users in Airtime.
|
||||||
|
#
|
||||||
|
# Absolute path to this script
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute directory this script is in
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
invokePwd=$PWD
|
||||||
|
cd $SCRIPTPATH
|
||||||
|
|
||||||
|
php -q airtime-user.php "$@" || exit 1
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/bin/php
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
set_include_path('../airtime_mvc/application/models' . PATH_SEPARATOR . get_include_path());
|
$airtimeIni = GetAirtimeConf();
|
||||||
require_once(__DIR__.'/../airtime_mvc/library/propel/runtime/lib/Propel.php');
|
$airtime_base_dir = $airtimeIni['general']['airtime_dir'];
|
||||||
Propel::init(__DIR__.'/../airtime_mvc/application/configs/airtime-conf.php');
|
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/../airtime_mvc/application/configs/conf.php');
|
set_include_path("$airtime_base_dir/application/models" . PATH_SEPARATOR . get_include_path());
|
||||||
require_once(dirname(__FILE__).'/../airtime_mvc/application/models/Users.php');
|
require_once("$airtime_base_dir/library/propel/runtime/lib/Propel.php");
|
||||||
|
Propel::init("$airtime_base_dir/application/configs/airtime-conf.php");
|
||||||
|
|
||||||
|
require_once("$airtime_base_dir/application/configs/conf.php");
|
||||||
|
require_once("$airtime_base_dir/application/models/Users.php");
|
||||||
require_once('DB.php');
|
require_once('DB.php');
|
||||||
require_once('Console/Getopt.php');
|
require_once('Console/Getopt.php');
|
||||||
|
|
||||||
|
@ -117,3 +119,15 @@ if ($action == "addupdate") {
|
||||||
$user->delete();
|
$user->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetAirtimeConf()
|
||||||
|
{
|
||||||
|
$ini = parse_ini_file("/etc/airtime/airtime.conf", true);
|
||||||
|
|
||||||
|
if ($ini === false){
|
||||||
|
echo "Error reading /etc/airtime/airtime.conf.".PHP_EOL;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ini;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue