Added new audio samples. Removed old files that are no longer in use.

This commit is contained in:
paul.baranowski 2010-12-09 15:42:05 -05:00
parent 8b404f3c62
commit 5e4ce5bd4f
171 changed files with 0 additions and 63991 deletions

View file

@ -1,18 +0,0 @@
#!/bin/bash
# param $1: workdir what we would like to tar
# param $2: output file: the .tar file
# param $3: statusfile
echo "==>"
date +\ %Y%m%d\ %H:%M:%S
echo "backup.sh: create tarball $1 to $2"
echo "backup.sh: status: #$3#"
echo "<=="
echo -n "working" > $3;
touch $2 || { echo -n "fault|error with .tar file" > $3; exit 1; }
#sleep 120
cd $1
tar cf $2 * || { echo -n "fault|error in tar procedure" > $3; exit 1; }
chmod 666 $2
echo -n "success" > $3

View file

@ -1,211 +0,0 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S.
#
# This file is part of the Campcaster 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
# 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,
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------------
# This script creates the database used by Campcaster
#
# Invoke as:
# ./bin/createDatabase.sh
#
# To get usage help, try the -h option
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Determine directories, files
#-------------------------------------------------------------------------------
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
bindir=$basedir/bin
etcdir=$basedir/etc
docdir=$basedir/doc
tmpdir=$basedir/tmp
usrdir=$basedir/usr
#-------------------------------------------------------------------------------
# Print the usage information for this script.
#-------------------------------------------------------------------------------
printUsage()
{
echo "Campcaster scheduler database creation script.";
echo "parameters";
echo "";
echo " -D, --database The name of the Campcaster database.";
echo " [default: Campcaster]";
echo " -s, --dbserver The name of the database server host.";
echo " [default: localhost]";
echo " -u, --dbuser The name of the database user to access the"
echo " database. [default: campcaster]";
echo " -w, --dbpassword The database user password.";
echo " [default: campcaster]";
echo " -h, --help Print this message and exit.";
echo "";
}
#-------------------------------------------------------------------------------
# Process command line parameters
#-------------------------------------------------------------------------------
CMD=${0##*/}
opts=$(getopt -o D:hs:u:w: -l database:,dbserver:,dbuser:,dbpassword:,help, -n $CMD -- "$@") || exit 1
eval set -- "$opts"
while true; do
case "$1" in
-D|--database)
database=$2;
shift; shift;;
-h|--help)
printUsage;
exit 0;;
-s|--dbserver)
dbserver=$2;
shift; shift;;
-u|--dbuser)
dbuser=$2;
shift; shift;;
-w|--dbpassword)
dbpassword=$2;
shift; shift;;
--)
shift;
break;;
*)
echo "Unrecognized option $1.";
printUsage;
exit 1;
esac
done
if [ "x$dbserver" == "x" ]; then
dbserver=localhost;
fi
if [ "x$database" == "x" ]; then
database=Campcaster;
fi
if [ "x$dbuser" == "x" ]; then
dbuser=campcaster;
fi
if [ "x$dbpassword" == "x" ]; then
dbpassword=campcaster;
fi
echo "Creating database for Campcaster scheduler.";
echo "";
echo "Using the following parameters:";
echo "";
echo " database server: $dbserver";
echo " database: $database";
echo " database user: $dbuser";
echo " database user password: $dbpassword";
echo ""
#-------------------------------------------------------------------------------
# The details of installation
#-------------------------------------------------------------------------------
ls_dbserver=$dbserver
ls_dbuser=$dbuser
ls_dbpassword=$dbpassword
ls_database=$database
postgres_user=postgres
#-------------------------------------------------------------------------------
# Function to check for the existence of an executable on the PATH
#
# @param $1 the name of the exectuable
# @return 0 if the executable exists on the PATH, non-0 otherwise
#-------------------------------------------------------------------------------
check_exe() {
if [ -x "`which $1 2> /dev/null`" ]; then
echo "Executable $1 found...";
return 0;
else
echo "Executable $1 not found...";
return 1;
fi
}
#-------------------------------------------------------------------------------
# Check to see if this script is being run as root
#-------------------------------------------------------------------------------
if [ `whoami` != "root" ]; then
echo "Please run this script as root.";
exit ;
fi
#-------------------------------------------------------------------------------
# Check for required tools
#-------------------------------------------------------------------------------
echo "Checking for required tools..."
check_exe "su" || exit 1;
check_exe "psql" || exit 1;
#-------------------------------------------------------------------------------
# Create the necessary database user and database itself
#-------------------------------------------------------------------------------
echo "Creating database and database user...";
# FIXME: the below might not work for remote databases
if [ "x$ls_dbserver" == "xlocalhost" ]; then
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
ENCRYPTED PASSWORD '$ls_dbpassword' \
CREATEDB NOCREATEUSER;\" \
| psql template1" \
|| echo "Couldn't create database user $ls_dbuser.";
su - $postgres_user -c "echo \"CREATE DATABASE \\\"$ls_database\\\" \
OWNER $ls_dbuser ENCODING 'utf-8';\" \
| psql template1" \
|| echo "Couldn't create database $ls_database.";
else
echo "Unable to automatically create database user and table for";
echo "remote database $ls_dbserver.";
echo "Make sure to create database user $ls_dbuser with password";
echo "$ls_dbpassword on database server at $ls_dbserver.";
echo "Also create a database called $ld_database, owned by this user.";
echo "";
echo "The easiest way to achieve this is by issuing the following SQL";
echo "commands to PostgreSQL:";
echo "CREATE USER $ls_dbuser";
echo " ENCRYPTED PASSWORD '$ls_dbpassword'";
echo " CREATEDB NOCREATEUSER;";
echo "CREATE DATABASE \"$ls_database\"";
echo " OWNER $ls_dbuser ENCODING 'utf-8';";
fi
# TODO: check for the success of these operations somehow
#-------------------------------------------------------------------------------
# Say goodbye
#-------------------------------------------------------------------------------
echo "Done."

View file

@ -1,9 +0,0 @@
<?
require_once(dirname(__FILE__)."/../conf.php");
header("Conten-type: text/plain");
$dbname = $CC_CONFIG['dsn']['database'];
$dbuser = $CC_CONFIG['dsn']['username'];
$dbhost = $CC_CONFIG['dsn']['hostspec'];
$res = `pg_dump -s $dbname -U $dbuser`;
echo "$res\n";
?>

View file

@ -1,85 +0,0 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S.
#
# This file is part of the Campcaster project.
# http://campcaster.sourcefabric.org/
#
# Campcaster 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,
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This script dumps the schema of the Campcaster database.
#
# To get usage help, try the -h option
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Determine directories, files
#-------------------------------------------------------------------------------
reldir=`dirname $0`/..
phpdir=ls_storageAdmin_phppart_dir
if [ "$phpdir" == "ls_storageAdmin_phppart_dir" ]
then
phpdir=`cd $reldir/var; pwd`
fi
filelistpathname=.
#-------------------------------------------------------------------------------
# Print the usage information for this script.
#-------------------------------------------------------------------------------
printUsage()
{
echo "This script dumps the schema of the Campcaster database.";
echo "parameters:";
echo "";
echo " -h, --help Print this message and exit.";
echo "";
}
#-------------------------------------------------------------------------------
# Process command line parameters
#-------------------------------------------------------------------------------
CMD=${0##*/}
opts=$(getopt -o h -l help -n $CMD -- "$@") || exit 1
eval set -- "$opts"
while true; do
case "$1" in
-h|--help)
printUsage;
exit 0;;
--)
shift;
break;;
*)
echo "Unrecognized option $1.";
printUsage;
exit 1;
esac
done
#-------------------------------------------------------------------------------
# Do the schema dump
#-------------------------------------------------------------------------------
cd $phpdir
php -q dumpDbSchema.php
#-------------------------------------------------------------------------------
# Say goodbye
#-------------------------------------------------------------------------------
echo "-- End of dump."

View file

@ -1,6 +0,0 @@
<?php
header("Content-type: text/plain");
require_once("../conf.php");
echo $CC_CONFIG['storageDir']."\n";
?>

View file

@ -1,40 +0,0 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S.
#
# This file is part of the Campcaster 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
# 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,
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This script grabs string at suplied URL
#-------------------------------------------------------------------------------
URL=$1
RES=`curl -sf ${URL}` || \
{
ERN=$?;
if [ $ERN -eq 22 ] ; then
echo "ERROR: curl: 22 - wrong URL ($URL)";
else
echo "ERROR: $ERN - unknown";
fi;
exit $ERN;
}
echo $RES

View file

@ -1,113 +0,0 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S.
#
# This file is part of the Campcaster 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
# 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,
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------------
# Playlist-to-file renderer caller. DUMMY VERSION.
#
# To get usage help, try the -h option
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Determine directories, files
#-------------------------------------------------------------------------------
reldir=`dirname $0`/..
#-------------------------------------------------------------------------------
# Print the usage information for this script.
#-------------------------------------------------------------------------------
printUsage()
{
echo "Playlist-to-file renderer caller. DUMMY VERSION.";
echo "parameters:";
echo "";
echo " -p, --playlist URL of SMIL playlist to be rendered.";
echo " -s, --statusfile Status file name.";
echo " -o, --output File name where the output will be written.";
echo " -h, --help Print this message and exit.";
echo "";
}
#-------------------------------------------------------------------------------
# Process command line parameters
#-------------------------------------------------------------------------------
CMD=${0##*/}
opts=$(getopt -o hp:s:o: -l help,playlist:,statusfile:,output: -n $CMD -- "$@") || exit 1
eval set -- "$opts"
while true; do
case "$1" in
-h|--help)
printUsage;
exit 0;;
-p|--playlist)
playlist=$2
shift; shift;;
-s|--statusfile)
statusfile=$2
shift; shift;;
-o|--output)
output=$2
shift; shift;;
--)
shift;
break;;
*)
echo "Unrecognized option $1.";
printUsage;
exit 1;
esac
done
if [ "x$playlist" == "x" ]; then
echo "Error in playlist parameter";
printUsage;
exit 1;
fi
if [ "x$statusfile" == "x" ]; then
echo "Error in statusfile parameter";
printUsage;
exit 1;
fi
if [ "x$output" == "x" ]; then
echo "Error in output parameter";
printUsage;
exit 1;
fi
#-------------------------------------------------------------------------------
# Do it
#-------------------------------------------------------------------------------
echo "renderer.sh: rendering $playlist to $output"
echo "working" > $statusfile;
touch $output || { echo "fail" > $statusfile; exit 1; }
#sleep 4
#sleep 2
echo -e "$playlist\n$output" >> $output || { echo "fail" > $statusfile; exit 1; }
echo "success" > $statusfile
#-------------------------------------------------------------------------------
# Say goodbye
#-------------------------------------------------------------------------------
echo "done"
exit 0

View file

@ -1,88 +0,0 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S.
#
# This file is part of the Campcaster project.
# http://campcaster.sourcefabric.org/
#
# Campcaster 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,
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This script does httpd writeable directories setup
#-------------------------------------------------------------------------------
WWW_ROOT=`cd var/install; php -q getWwwRoot.php` || exit $?
echo " *** StorageServer bin/setupDirs.sh BEGIN"
echo " * Root URL: $WWW_ROOT"
PHP_PWD_COMMAND=`bin/getUrl.sh $WWW_ROOT/install/getPwd.php` || \
{
errno=$?
if [ $errno -eq 22 ]
then
echo "root URL is not accessible - configure HTTP entry point, please"
fi
exit $errno
}
PHP_PWD=$PHP_PWD_COMMAND
# MOD_PHP may not be working, this command will tell us
if [ ${PHP_PWD_COMMAND:0:5} == '<?php' ]; then
echo "MOD_PHP is not working, the raw PHP file is being returned instead of result of the PHP code."
exit 1
fi
if [ $PHP_PWD == "" ]; then
echo " * ERROR: Could not get PHP working directory."
exit 1
fi
echo " ** Webspace mapping test:"
echo " * mod_php : $PHP_PWD"
INSTALL_DIR="$PWD/var/install"
echo " * install : $INSTALL_DIR"
if [ $PHP_PWD == $INSTALL_DIR ]; then
echo " * Mapping OK"
else
echo " * WARNING: there was a problem with webspace mapping!!!"
fi
HTTP_GROUP=`bin/getUrl.sh $WWW_ROOT/install/getGname.php` || \
{
ERN=$?;
echo $HTTP_GROUP;
echo " -> Probably wrong setting in var/conf.php: URL configuration";
exit $ERN;
}
echo " ** The system group that is running the http daemon: '$HTTP_GROUP'"
for i in $*
do
echo " * chown :$HTTP_GROUP $i"
if [ -G $i ]; then
chown :$HTTP_GROUP $i || \
{
ERN=$?;
echo "ERROR: chown :$HTTP_GROUP $i -> You should have permissions to set group owner to group '$HTTP_GROUP'";
exit $ERN;
}
echo " * chmod g+sw $i"
chmod g+sw $i || exit $?
fi
done
echo " *** StorageServer bin/setupDirs.sh END"
exit 0