Started to create pypo install script (install/pypo-install.py).
Cleaned up liquidsoap scripts a bit. Renamed nondbinstall.php to propel-install.php Removed unused files.
This commit is contained in:
parent
51a1fde9ee
commit
3c12256cb8
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import time
|
||||
import os
|
||||
import traceback
|
||||
from optparse import *
|
||||
import sys
|
||||
import time
|
||||
import datetime
|
||||
import logging
|
||||
import logging.config
|
||||
import shutil
|
||||
import string
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
|
||||
def create_path(path):
|
||||
if not (os.path.exists(path)):
|
||||
print "Creating directory " + path
|
||||
os.makedirs(path)
|
||||
|
||||
try:
|
||||
# Does pypo user exist?
|
||||
print "Checking for pypo user..."
|
||||
p = Popen('id pypo', shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
|
||||
output = p.stdout.read()
|
||||
if (output[0:3] != "uid"):
|
||||
# Make the pypo user
|
||||
print "Creating pypo user..."
|
||||
os.system("adduser --system --quiet --group --disabled-login --no-create-home pypo")
|
||||
|
||||
print "Creating directories..."
|
||||
create_path("/var/log/pypo")
|
||||
os.system("chmod -R 755 /var/log/pypo")
|
||||
os.system("chown -R pypo:pypo /var/log/pypo")
|
||||
#os.mkdirs("/var/log/liquidsoap")
|
||||
#os.system("chown -R liquidsoap:liquidsoap /var/log/liquidsoap")
|
||||
create_path("/opt/pypo")
|
||||
create_path("/opt/pypo/cache")
|
||||
create_path("/opt/pypo/files")
|
||||
create_path("/opt/pypo/files/basic")
|
||||
create_path("/opt/pypo/files/fallback")
|
||||
create_path("/opt/pypo/files/jingles")
|
||||
create_path("/opt/pypo/archive")
|
||||
os.system("chmod -R 755 /opt/pypo/")
|
||||
os.system("chown -R pypo:pypo /opt/pypo")
|
||||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
|
||||
print "Done."
|
||||
|
|
@ -1,121 +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
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
# A script to set up the development environment for Campcaster
|
||||
#
|
||||
# Invoke as:
|
||||
# ./bin/setupDevelopmentEnvironment.sh
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Determine directories, files
|
||||
#-------------------------------------------------------------------------------
|
||||
reldir=`dirname $0`/..
|
||||
basedir=`cd $reldir; pwd;`
|
||||
bindir=$basedir/bin
|
||||
etcdir=$basedir/etc
|
||||
docdir=$basedir/doc
|
||||
srcdir=$basedir/src
|
||||
tmpdir=$basedir/tmp
|
||||
toolsdir=$srcdir/tools
|
||||
modules_dir=$srcdir/modules
|
||||
products_dir=$srcdir/products
|
||||
|
||||
usrdir=`cd $basedir/usr; pwd;`
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Print the usage information for this script.
|
||||
#-------------------------------------------------------------------------------
|
||||
printUsage()
|
||||
{
|
||||
echo "Campcaster development environment setup script.";
|
||||
echo "parameters";
|
||||
echo "";
|
||||
echo " -g, --apache-group The group the apache daemon runs as.";
|
||||
echo " [default: apache]";
|
||||
echo " -h, --help Print this message and exit.";
|
||||
echo "";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Process command line parameters
|
||||
#-------------------------------------------------------------------------------
|
||||
CMD=${0##*/}
|
||||
|
||||
opts=$(getopt -o g:h -l apache-group:,help -n $CMD -- "$@") || exit 1
|
||||
eval set -- "$opts"
|
||||
while true; do
|
||||
case "$1" in
|
||||
-g|--apache-group)
|
||||
apache_group=$2;
|
||||
shift; shift;;
|
||||
-h|--help)
|
||||
printUsage;
|
||||
exit 0;;
|
||||
--)
|
||||
shift;
|
||||
break;;
|
||||
*)
|
||||
echo "Unrecognized option $1.";
|
||||
printUsage;
|
||||
exit 1;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "x$apache_group" == "x" ]; then
|
||||
apache_group=apache;
|
||||
fi
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Create the configure script
|
||||
#-------------------------------------------------------------------------------
|
||||
rm -rf $tmpdir/configure
|
||||
$bindir/autogen.sh || exit 1
|
||||
$basedir/configure --prefix=$usrdir \
|
||||
--with-www-docroot=$usrdir/var \
|
||||
--with-apache-group=$apache_group \
|
||||
--enable-debug || exit 1
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Compile everything at once, including the tools
|
||||
#-------------------------------------------------------------------------------
|
||||
make -C $basedir all || exit 1
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# User setup
|
||||
#-------------------------------------------------------------------------------
|
||||
#echo "Setting up user settings..."
|
||||
|
||||
$bindir/user_setup.sh --apache-group=$apache_group || exit 1
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# We're done
|
||||
#-------------------------------------------------------------------------------
|
||||
echo "Done."
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
CREATE SEQUENCE file_id_seq
|
||||
INCREMENT 1
|
||||
MINVALUE 1
|
||||
MAXVALUE 9223372036854775807
|
||||
START 1000000
|
||||
CACHE 1;
|
||||
|
||||
ALTER TABLE ls_files
|
||||
ALTER COLUMN id
|
||||
SET DEFAULT NEXTVAL('file_id_seq');
|
||||
|
||||
DROP TABLE ls_struct CASCADE;
|
||||
DROP TABLE ls_tree CASCADE;
|
||||
DROP TABLE ls_classes CASCADE;
|
||||
DROP TABLE ls_cmemb CASCADE;
|
||||
|
||||
DROP SEQUENCE ls_struct_id_seq_seq;
|
||||
DROP SEQUENCE ls_tree_id_seq_seq;
|
||||
|
||||
DROP TABLE as_tree CASCADE;
|
||||
DROP TABLE as_struct CASCADE;
|
||||
DROP TABLE as_classes CASCADE;
|
||||
DROP TABLE as_cmemb CASCADE;
|
||||
|
||||
DROP SEQUENCE as_struct_id_seq_seq;
|
||||
DROP SEQUENCE as_tree_id_seq_seq;
|
||||
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN track_title character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN artist_name character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN bit_rate character varying(32);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN sample_rate character varying(32);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN format character varying(128);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN length character (16);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN album_title character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN genre character varying(64);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN comments text;
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN "year" character varying(16);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN track_number integer;
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN channels integer;
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN url character varying(1024);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN bpm character varying(8);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN rating character varying(8);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN encoded_by character varying(255);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN disc_number character varying(8);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN mood character varying(64);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN label character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN composer character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN encoder character varying(64);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN checksum character varying(256);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN lyrics text;
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN orchestra character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN conductor character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN lyricist character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN original_lyricist character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN radio_station_name character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN info_url character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN artist_url character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN audio_source_url character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN radio_station_url character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN buy_this_url character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN isrc_number character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN catalog_number character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN original_artist character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN copyright character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN report_datetime character varying(32);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN report_location character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN report_organization character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN subject character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN contributor character varying(512);
|
||||
ALTER TABLE cc_files
|
||||
ADD COLUMN language character varying(512);
|
||||
|
||||
|
||||
ALTER TABLE cc_schedule RENAME playlist TO playlist_id;
|
||||
ALTER TABLE cc_schedule ALTER playlist_id TYPE integer;
|
||||
ALTER TABLE cc_schedule ADD COLUMN group_id integer;
|
||||
ALTER TABLE cc_schedule ADD COLUMN file_id integer;
|
||||
ALTER TABLE cc_schedule
|
||||
ADD COLUMN clip_length time without time zone DEFAULT '00:00:00.000000';
|
||||
ALTER TABLE cc_schedule
|
||||
ADD COLUMN fade_in time without time zone DEFAULT '00:00:00.000';
|
||||
ALTER TABLE cc_schedule
|
||||
ADD COLUMN fade_out time without time zone DEFAULT '00:00:00.000';
|
||||
ALTER TABLE cc_schedule
|
||||
ADD COLUMN cue_in time without time zone DEFAULT '00:00:00.000';
|
||||
ALTER TABLE cc_schedule
|
||||
ADD COLUMN cue_out time without time zone DEFAULT '00:00:00.000';
|
||||
ALTER TABLE cc_schedule ADD CONSTRAINT unique_id UNIQUE (id);
|
||||
|
||||
CREATE SEQUENCE schedule_group_id_seq;
|
||||
|
||||
DROP TABLE cc_mdata CASCADE;
|
|
@ -1,101 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Campcaster
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*
|
||||
*/
|
||||
|
||||
// Do not allow remote execution
|
||||
$arr = array_diff_assoc($_SERVER, $_ENV);
|
||||
if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
|
||||
header("HTTP/1.1 400");
|
||||
header("Content-type: text/plain; charset=UTF-8");
|
||||
echo "400 Not executable\r\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
echo "*********************************************\n";
|
||||
echo "* StorageServer Upgrade from 1.1.X to 1.2.0 *\n";
|
||||
echo "*********************************************\n";
|
||||
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once(dirname(__FILE__)."/../installInit.php");
|
||||
campcaster_db_connect();
|
||||
require_once(dirname(__FILE__)."/../../StoredFile.php");
|
||||
|
||||
// Check to see if upgrade has already been applied
|
||||
$sql = "SELECT md5 FROM ".$CC_CONFIG['filesTable']." LIMIT 1";
|
||||
$result = $CC_DBC->query($sql);
|
||||
if (!PEAR::isError($result)) {
|
||||
echo " * THIS UPGRADE HAS ALREADY BEEN APPLIED.\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
echo " * Adding column 'md5' to '".$CC_CONFIG['filesTable']." table...";
|
||||
$sql = "ALTER TABLE ".$CC_CONFIG['filesTable']." ADD COLUMN md5 char(32)";
|
||||
camp_install_query($sql, false);
|
||||
$sql = "ALTER TABLE ".$CC_CONFIG['filesTable']." ALTER COLUMN md5 SET STORAGE EXTENDED";
|
||||
camp_install_query($sql);
|
||||
|
||||
echo " * Creating index on column 'md5'...";
|
||||
$sql = "CREATE INDEX ".$CC_CONFIG['filesTable']."_md5_idx ON ".$CC_CONFIG['filesTable']." (md5)";
|
||||
camp_install_query($sql);
|
||||
|
||||
echo " * Converting metadata values 'ls:genre' to 'dc:type'...";
|
||||
$sql = "UPDATE ".$CC_CONFIG['mdataTable']." SET predns='dc', predicate='type' WHERE predns='ls' and predicate='genre'";
|
||||
camp_install_query($sql);
|
||||
|
||||
echo " * Adding 'jobpid' to ".$CC_CONFIG['transTable']."...";
|
||||
$sql = "ALTER TABLE ".$CC_CONFIG['transTable']." ADD COLUMN jobpid int";
|
||||
camp_install_query($sql);
|
||||
|
||||
echo " * Fixing track numbers...\n";
|
||||
$sql = "SELECT id, object as track_num FROM ".$CC_CONFIG['mdataTable']
|
||||
." WHERE predns='ls' AND predicate='track_num'";
|
||||
$rows = $CC_DBC->GetAll($sql);
|
||||
foreach ($rows as $row) {
|
||||
$newTrackNum = camp_parse_track_number($row["track_num"]);
|
||||
if ($row["track_num"] != $newTrackNum) {
|
||||
echo " * Converting '".$row["track_num"]."' --> '$newTrackNum'\n";
|
||||
$sql = "UPDATE ".$CC_CONFIG["mdataTable"]
|
||||
." SET object='$newTrackNum'"
|
||||
." WHERE id=".$row["id"];
|
||||
$CC_DBC->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
// Get MD5 values for all files
|
||||
echo " * Computing MD5 sums for all files (this may take a while)...\n";
|
||||
$sql = "SELECT to_hex(gunid) as gunid, name FROM ".$CC_CONFIG['filesTable'] ." WHERE ftype='audioclip'";
|
||||
$rows = $CC_DBC->GetAll($sql);
|
||||
$errorFiles = array();
|
||||
foreach ($rows as $row) {
|
||||
$gunid = StoredFile::NormalizeGunid($row['gunid']);
|
||||
$storedFile = new StoredFile($gunid);
|
||||
$fileName = $storedFile->getRealFileName();
|
||||
$humanName = basename($row['name']);
|
||||
echo " File: $humanName\n";
|
||||
if (file_exists($fileName)) {
|
||||
$md5 = md5_file($fileName);
|
||||
$storedFile->setMd5($md5);
|
||||
//echo " MD5: $md5\n";
|
||||
} else {
|
||||
$errorFiles[] = "$gunid -- $humanName";
|
||||
echo " ERROR: file does not exist! (GUNID: $gunid)\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (count($errorFiles) > 0) {
|
||||
echo "\n\nWARNING\n";
|
||||
echo "The following files were not found:\n";
|
||||
foreach ($errorFiles as $file) {
|
||||
echo $file."\n";
|
||||
}
|
||||
}
|
||||
echo "*******************************************\n";
|
||||
echo "* StorageServer Upgrade to 1.2.0 Complete *\n";
|
||||
echo "*******************************************\n";
|
||||
|
||||
?>
|
|
@ -1 +0,0 @@
|
|||
upgrade-to-1.2.0.php
|
|
@ -2,36 +2,10 @@
|
|||
# Dynamic variables
|
||||
#######################################################################
|
||||
|
||||
playlist_id = ref '0'
|
||||
user_id = ref '0'
|
||||
transmission_id = ref '0'
|
||||
playlist_type = ref '0'
|
||||
pypo_data = ref '0'
|
||||
|
||||
def set_pypo_data(s)
|
||||
pypo_data := s
|
||||
end
|
||||
|
||||
def set_user_id(s)
|
||||
user_id := s
|
||||
end
|
||||
|
||||
|
||||
def set_playlist_id(s)
|
||||
playlist_id := s
|
||||
end
|
||||
|
||||
|
||||
def set_transmission_id(s)
|
||||
transmission_id := s
|
||||
end
|
||||
|
||||
def set_playlist_type(s)
|
||||
playlist_type := s
|
||||
end
|
||||
|
||||
server.register(namespace="vars", "user_id", fun (s) -> begin set_user_id(s) "Done!" end)
|
||||
server.register(namespace="vars", "playlist_id", fun (s) -> begin set_playlist_id(s) "Done!" end)
|
||||
server.register(namespace="vars", "transmission_id", fun (s) -> begin set_transmission_id(s) "Done!" end)
|
||||
server.register(namespace="vars", "playlist_type", fun (s) -> begin set_playlist_type(s) "Done!" end)
|
||||
server.register(namespace="vars", "pypo_data", fun (s) -> begin set_pypo_data(s) "Done!" end)
|
|
@ -1,14 +1,10 @@
|
|||
#######################################################################
|
||||
# Live input - From external icecast server
|
||||
#######################################################################
|
||||
|
||||
|
||||
live_in = input.http(id="live_in",autostart=false,buffer=.1, max=12.,couchcaster_list)
|
||||
live_in = buffer(id="buffer_live_in",buffer=.1,fallible=true,live_in)
|
||||
live_in = mksafe(live_in)
|
||||
|
||||
|
||||
|
||||
live_active = ref false
|
||||
def live_switch(i)
|
||||
print(i)
|
||||
|
|
|
@ -4,25 +4,19 @@
|
|||
|
||||
def notify(m)
|
||||
|
||||
# print('user_id: #{!user_id}')
|
||||
# print('playlist_id: #{!playlist_id}')
|
||||
# print('transmission_id: #{!transmission_id}')
|
||||
# print('playlist_type: #{!playlist_type}')
|
||||
|
||||
if !playlist_type=='5' then
|
||||
print('livesession')
|
||||
system("./notify.sh --playing --playlist-type=#{!playlist_type} --transmission-id=#{!transmission_id} --export-source=scheduler")
|
||||
#print('livesession')
|
||||
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['media_id']} --export-source=scheduler")
|
||||
end
|
||||
|
||||
if !playlist_type=='6' then
|
||||
print('couchcaster')
|
||||
system("./notify.sh --playing --playlist-type=#{!playlist_type} --transmission-id=#{!transmission_id} --export-source=scheduler")
|
||||
#print('couchcaster')
|
||||
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['media_id']} --export-source=scheduler")
|
||||
end
|
||||
|
||||
if !playlist_type=='0' or !playlist_type=='1' or !playlist_type=='2' or !playlist_type=='3' or !playlist_type=='4' then
|
||||
print('include_notify.liq: notify on playlist')
|
||||
#system("./notify.sh --playing --playlist-type=#{!playlist_type} --media-id=#{m['media_id']} --export-source=#{m['export_source']}")
|
||||
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['media_id']}")
|
||||
#print('include_notify.liq: notify on playlist')
|
||||
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['media_id']}")
|
||||
end
|
||||
|
||||
end
|
|
@ -51,11 +51,12 @@ end
|
|||
def scheduler_status()
|
||||
print('scheduler_active: #{!scheduler_active}')
|
||||
print('scheduler_queue : #{!scheduler_queue}')
|
||||
|
||||
print('user_id: #{!user_id}')
|
||||
print('playlist_id: #{!playlist_id}')
|
||||
print('transmission_id: #{!transmission_id}')
|
||||
print('playlist_type: #{!playlist_type}')
|
||||
print('pypo_data: #{!pypo_data}')
|
||||
|
||||
#print('user_id: #{!user_id}')
|
||||
#print('playlist_id: #{!playlist_id}')
|
||||
#print('transmission_id: #{!transmission_id}')
|
||||
#print('playlist_type: #{!playlist_type}')
|
||||
|
||||
"Done"
|
||||
end
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
###########################################
|
||||
# liquidsoap config file #
|
||||
###########################################
|
||||
|
||||
# author Jonas Ohrstrom <jonas@digris.ch>
|
||||
|
||||
|
||||
# this file is specific to the obp
|
||||
# installation. eg it assumes that there are
|
||||
# This config assumes that there are
|
||||
# two instances of LS running
|
||||
# the "scheduler" & the "fallback" instance
|
||||
|
||||
|
@ -15,22 +10,20 @@
|
|||
# general settings #
|
||||
###########################################
|
||||
|
||||
log_file = "/var/log/obp/ls/<script>.log"
|
||||
log_file = "/var/log/pypo/<script>.log"
|
||||
log_level = 3
|
||||
|
||||
# archive directory
|
||||
archive_dir = "/storage/pypo/archive/"
|
||||
|
||||
archive_dir = "/opt/pypo/archive/"
|
||||
|
||||
# list pointing to the current couchcaster mountpoint
|
||||
couchcaster_list = "http://vdeb.openbroadcast.ch/mod/ml/api/pypo/current_couchcaster"
|
||||
|
||||
|
||||
|
||||
###########################################
|
||||
# stream settings #
|
||||
###########################################
|
||||
icecast_host = "172.16.16.128"
|
||||
icecast_host = "127.0.0.1"
|
||||
icecast_port = 8000
|
||||
icecast_pass = "hackme"
|
||||
|
||||
|
@ -43,7 +36,7 @@ mount_final = "pypo_final.mp3"
|
|||
mount_intra = "pypo_intra"
|
||||
|
||||
# intra-LS streaming (no icecast here)
|
||||
intra_host = "172.16.16.128"
|
||||
intra_host = "127.0.0.1"
|
||||
intra_port = 9000
|
||||
intra_pass = "hackme"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
######################################
|
||||
# main liquidsoap development script #
|
||||
######################################
|
||||
|
||||
# author Jonas Ohrstrom <jonas@digris.ch>
|
||||
|
||||
########################################
|
||||
|
@ -10,15 +9,12 @@
|
|||
|
||||
%include "ls_config.liq"
|
||||
%include "library.liq"
|
||||
|
||||
%include "include_dynamic_vars.liq"
|
||||
%include "include_notify.liq"
|
||||
|
||||
|
||||
silence_threshold = -50.
|
||||
silence_time = 3.
|
||||
|
||||
|
||||
# log
|
||||
set("log.file.path",log_file)
|
||||
set("log.stdout", true)
|
||||
|
@ -27,17 +23,13 @@ set("log.level",log_level)
|
|||
# telnet server
|
||||
set("server.telnet", true)
|
||||
|
||||
|
||||
|
||||
######################################
|
||||
# some functions needed #
|
||||
######################################
|
||||
|
||||
def fcross(a,b) =
|
||||
add(normalize=false,[b,a])
|
||||
end
|
||||
|
||||
|
||||
######################################
|
||||
# live recording functions
|
||||
######################################
|
||||
|
@ -52,16 +44,12 @@ def live_stop() =
|
|||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# File locations / sources
|
||||
#######################################################################
|
||||
|
||||
silence = single("/storage/pypo/files/basic/silence.mp3")
|
||||
jingles_cc = playlist("/storage/pypo/files/jingles/jcc")
|
||||
fallback_couchcaster = playlist("/storage/pypo/files/fallback_couchcaster")
|
||||
silence = single("/opt/pypo/files/basic/silence.mp3")
|
||||
jingles_cc = playlist("/opt/pypo/files/jingles/jcc")
|
||||
fallback_couchcaster = playlist("/opt/pypo/files/fallback_couchcaster")
|
||||
fallback_couchcaster = audio_to_stereo(fallback_couchcaster)
|
||||
|
||||
# default
|
||||
|
@ -70,70 +58,36 @@ default = silence
|
|||
special = request.queue(id="special")
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Includeing two A/B Queues, daypart & scheduler
|
||||
# this will give us the sources 'daypart' & 'scheduler'
|
||||
#######################################################################
|
||||
|
||||
%include "include_daypart.liq"
|
||||
|
||||
%include "include_scheduler.liq"
|
||||
|
||||
|
||||
source = fallback(track_sensitive=false,transitions=[dp_to_scheduler],[strip_blank(threshold=silence_threshold,length=silence_time,scheduler),daypart])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%include "include_live_in.liq"
|
||||
|
||||
|
||||
|
||||
live = fallback(track_sensitive=false,[strip_blank(threshold=silence_threshold,length=silence_time,live),fallback_couchcaster])
|
||||
live = switch(track_sensitive=false, [({!live_active},live)])
|
||||
|
||||
source = fallback(track_sensitive=false,transitions=[to_live_s, to_scheduler_s],[live, source])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# handle the annotate fades
|
||||
faded = fade.in(type="log", fade.out(type="log", source))
|
||||
|
||||
# add up with a crossfade function (defined above)
|
||||
source = cross(fcross,faded)
|
||||
|
||||
|
||||
# track start detection (for notifications)
|
||||
source = on_metadata(notify, source)
|
||||
#source = on_track(notify, source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# special to mix with final source
|
||||
source = smooth_add(normal=source,special=special)
|
||||
|
||||
|
||||
|
||||
|
||||
#####################################
|
||||
# Stream Output
|
||||
#####################################
|
||||
|
@ -147,8 +101,4 @@ clock(id="clock_icecast",
|
|||
restart_delay = 5,
|
||||
buffer(source)))
|
||||
|
||||
|
||||
|
||||
#output.dummy(live_in)
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ sleep 1
|
|||
clear
|
||||
|
||||
# split
|
||||
multitail -s 2 /var/log/obp/pypo/debug.log \
|
||||
multitail -s 2 /var/log/pypo/debug.log \
|
||||
/var/svc.d/pypo_push/log/main/current \
|
||||
/var/svc.d/pypo_fetch/log/main/current \
|
||||
/var/svc.d/pypo_ls/log/main/current
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
||||
/opt/pypo/files/basic/silence.mp3
|
Loading…
Reference in New Issue