From a636257516beee51b56178738addb62c0469de6c Mon Sep 17 00:00:00 2001 From: James Date: Fri, 2 Sep 2011 10:37:52 -0400 Subject: [PATCH] CC-2756: airtime-system remove --- utils/airtime-system | 34 -------------- utils/airtime-system.php | 99 ---------------------------------------- 2 files changed, 133 deletions(-) delete mode 100755 utils/airtime-system delete mode 100644 utils/airtime-system.php diff --git a/utils/airtime-system b/utils/airtime-system deleted file mode 100755 index f6cec9cfe..000000000 --- a/utils/airtime-system +++ /dev/null @@ -1,34 +0,0 @@ -#!/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 sets stream setting(max bitrate and number of streams 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-system.php "$@" || exit 1 diff --git a/utils/airtime-system.php b/utils/airtime-system.php deleted file mode 100644 index 8a31ea4c8..000000000 --- a/utils/airtime-system.php +++ /dev/null @@ -1,99 +0,0 @@ -\n"; - echo " Set the max bitrate allowed by Airtime.\n"; - echo " --numofstream \n"; - echo " Set the number of stream allowed by Airtime.\n"; - echo " --planlevel \n"; - echo " Set the plan type for Airtime system.(trial, regular).\n"; - echo "\n"; -} - - -if (count($argv) != 3) { - printUsage(); - exit; -} - - -$action = null; -switch ($argv[1]) { - case '--maxbitrate': - $action = "maxbitrate"; - break; - case '--numofstream': - $action = "numofstream"; - break; - case '--planlevel': - $action = "planlevel"; - break; -} - -$optionArg = $argv[2]; -if (is_null($action)) { - printUsage(); - exit; -} - -PEAR::setErrorHandling(PEAR_ERROR_RETURN); -$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE); -if (PEAR::isError($CC_DBC)) { - die($CC_DBC->getMessage()); -} -$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); - -if ($action == "maxbitrate") { - Application_Model_Preference::SetMaxBitrate($optionArg); -} elseif ($action == "numofstream") { - Application_Model_Preference::SetNumOfStreams($optionArg); -} elseif ($action == "planlevel"){ - $plans = array("trial", "regular"); - if(in_array($optionArg, $plans)){ - Application_Model_Preference::SetPlanLevel($optionArg); - echo "Setting the plan level to '$optionArg'.".PHP_EOL; - }else{ - echo "Error: Unknown plan level '$optionArg'.".PHP_EOL; - exit; - } -} - -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; -}