From 52a103e6436ab4b9160eb137371f97ce6320a538 Mon Sep 17 00:00:00 2001 From: yomguy <> Date: Fri, 19 Nov 2010 10:39:48 +0000 Subject: [PATCH] modify install procedure --- .../apache2/sites-available/telecaster.conf | 3 +- conf/etc/telecaster/deefuzzer.xml | 15 +- conf/etc/telecaster/edcast_jack_local.cfg | 6 +- conf/etc/telecaster/telecaster.xml | 16 +- conf/etc/telecaster/telecaster_pb.xml | 325 +++++++++++++++++- install.py | 84 +++-- 6 files changed, 385 insertions(+), 64 deletions(-) diff --git a/conf/etc/apache2/sites-available/telecaster.conf b/conf/etc/apache2/sites-available/telecaster.conf index 71e8312..4859b3e 100644 --- a/conf/etc/apache2/sites-available/telecaster.conf +++ b/conf/etc/apache2/sites-available/telecaster.conf @@ -1,9 +1,8 @@ ServerAdmin webmaster@localhost - ServerName telecasterXXX.parisson.com DocumentRoot /var/www/ - SuexecUserGroup prebarreau prebarreau + SuexecUserGroup telecaster telecaster ErrorLog /var/log/apache2/error.log diff --git a/conf/etc/telecaster/deefuzzer.xml b/conf/etc/telecaster/deefuzzer.xml index a8cead6..dfb6d84 100644 --- a/conf/etc/telecaster/deefuzzer.xml +++ b/conf/etc/telecaster/deefuzzer.xml @@ -1,13 +1,13 @@ - /var/log/deefuzzer/preb.log - /var/www/m3u/preb.m3u + /var/log/deefuzzer/telecaster.log + /var/www/m3u/telecaster.m3u telecaster_local - TeleCaster LocalHost + TeleCaster Localhost TeleCaster local audio streaming - http://crfpa.pre-barreau.com + http://parisson.com Vocal @@ -59,9 +59,9 @@ telecaster - TeleCaster #4 - TeleCaster testing - http://crfpa.pre-barreau.com + TeleCaster Remote + TeleCaster Remote + http://parisson.com School @@ -109,7 +109,6 @@ - diff --git a/conf/etc/telecaster/edcast_jack_local.cfg b/conf/etc/telecaster/edcast_jack_local.cfg index dc66cc7..ac68675 100644 --- a/conf/etc/telecaster/edcast_jack_local.cfg +++ b/conf/etc/telecaster/edcast_jack_local.cfg @@ -9,7 +9,7 @@ ServerPublic=0 ServerIRC= ServerAIM= ServerICQ= -ServerStreamURL=http://pre-barreau.com +ServerStreamURL=http://parisson.com ServerName=TeleCaster LIVE ServerDescription=Local LIVE media streaming broadcast ServerGenre=Vocal @@ -26,7 +26,7 @@ BitrateMax=96 # SaveDirectoryFlag=1 -SaveDirectory=/home/pre-barreau/trash +SaveDirectory=/home/telecaster/trash SaveAsWAV=0 # # Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management) @@ -49,5 +49,5 @@ AACCutoff= # Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_WARNING, 3 = LOG_ERROR+LOG_WARNING+LOG_DEBUG LogLevel=1 # Log File -LogFile=/tmp/streamTranscoder_1 +LogFile=/tmp/telecaster_streamer_log diff --git a/conf/etc/telecaster/telecaster.xml b/conf/etc/telecaster/telecaster.xml index cf0e78e..b694f1a 100644 --- a/conf/etc/telecaster/telecaster.xml +++ b/conf/etc/telecaster/telecaster.xml @@ -1,19 +1,19 @@ - Pre-Barreau - Pre-Barreau - La preparation au Barreau de Paris - telecaster-04.parisson.com - Vocal + Parisson + Parisson + Parisson TeleCaster Services + telecaster.parisson.com + Various - /tmp/telecaster.log + /var/log/telecaster.log /etc/telecaster/deefuzzer.xml true - /home/prebarreau/media - /home/prebarreau/archives + /home/telecaster/media + /home/telecaster/archives mp3 96 1 diff --git a/conf/etc/telecaster/telecaster_pb.xml b/conf/etc/telecaster/telecaster_pb.xml index 0753539..cf0e78e 100644 --- a/conf/etc/telecaster/telecaster_pb.xml +++ b/conf/etc/telecaster/telecaster_pb.xml @@ -3,23 +3,17 @@ Pre-Barreau Pre-Barreau La preparation au Barreau de Paris - http:///telecaster-04.parisson.com + telecaster-04.parisson.com Vocal - - localhost - 8000 - source2parisson - 0 - /etc/telecaster/deefuzzer.xml - - /var/www/rss/ - - + /tmp/telecaster.log + + /etc/telecaster/deefuzzer.xml + true - /home/pre-barreau/media - /home/pre-barreau/backup + /home/prebarreau/media + /home/prebarreau/archives mp3 96 1 @@ -31,4 +25,309 @@ jack_rack:out_1 + + + CRFPA + + + Droit_administratif_Corrections + + + Droit_administratif_Cours + + + Droit_des_obligations_Corrections + + + Droit_des_obligations_Cours + + + Droit_commercial_des_affaires_Corrections + + + Droit_commercial_des_affaires_Cours + + + Droit_communautaire_et_europeen_Corrections + + + Droit_communautaire_et_europeen_Cours + + + Droit_de_la_famille_et_des_personnes_Corrections + + + Droit_de_la_famille_et_des_personnes_Cours + + + Droit_du_travail_Corrections + + + Droit_du_travail_Cours + + + Droit_fiscal_Corrections + + + Droit_fiscal_Cours + + + Droit_international_prive_Corrections + + + Droit_international_prive_Cours + + + Droit_patrimonial_Corrections + + + Droit_patrimonial_Cours + + + Droit_public_des_activites_economiques_Corrections + + + Droit_public_des_activites_economiques_Cours + + + Droit_penal_Corrections + + + Droit_penal_Cours + + + Droit_Libertes_publiques_Cours + + + Note_de_synthese_Corrections + + + Procedure_administrative_et_contentieuse_Corrections + + + Procedure_administrative_et_contentieuse_Cours + + + Procedure_civile_Corrections + + + Procedure_civile_Cours + + + Procedures_collectives_et_suretes_Corrections + + + Procedures_collectives_et_suretes_Cours + + + Procedure_penale_Corrections + + + Procedure_penale_Cours + + + Oral-Procedures_communautaires + + + Oral-Voies_d_ex + + + Oral-Comptabilite_privee + + + Oral-Finances_publiques + + + TEST + + + + + + + AE + + + Administratif_Cours + + + Adm_Correction + + + Civil_Correction + + + Commercial_Correctio + + + Commercial_Cours + + + Deontologie_Cours + + + Droit civil - Cours + + + Methodo_Oraux + + + Penal_Correction + + + Penal_Cours + + + Procedures_Cours + + + Reunion_info + + + Social_Corrections + + + Social_Cours + + + REUNION + + + TEST + + + + + + ENM + + + TEST + + + REUNION + + + + + + + FJP + + + Actualisation + + + TEST + + + REUNION + + + + + + MARINHO A. + + + GIUSTINIANI G. + + + BOFFA R. + + + MEUNIER J. + + + THERY C. + + + JLB + + + AZZI T. + + + ETIENNEY A. + + + MARKUS J. + + + ANDREU L. + + + ROUMIER W. + + + HAIK R. + + + POISSON S. + + + CARTIER-BRESSON A. + + + MBONGO P. + + + MATHONNET P. + + + FOULQUIER N. + + + RILOV. F + + + JEANSEN E. + + + LA J. + + + MECARELLI G. + + + COLLET M. + + + GILBERT S. + + + VIAL C. + + + PAGNERRE E. + + + PANOU C. + + + GILBERT S. + + + ROBBE S. + + + + 1ere_sem + 2e_sem + 3e_sem + 4e_sem + 5e_sem + 6e_sem + 7e_sem + 8e_sem + 9e_sem + 10e_sem + 11e_sem + 12e_sem + 13e_sem + 14e_sem + 15e_sem + 16e_sem + + diff --git a/install.py b/install.py index e4f675d..7a4f7f3 100644 --- a/install.py +++ b/install.py @@ -41,51 +41,75 @@ import os, sys import platform -install_dir = '/var/www/telecaster' -if not os.path.exists(install_dir): - os.mkdir(install_dir) +def remove_svn(path): + for root, dirs, files in os.walk(path): + for dir in dirs: + if '.svn' in dir: + shutil.rmtree(root + os.sep + dir) + +app_dir = os.getcwd() + +user = 'telecaster' +home = '/home/' + user +if not os.path.exists(home): + print 'Please give some informations for the new "telecaster" user :' + os.system('adduser ' + user) + +# compiling edcast-jack +os.chdir(app_dir + '/tools/edcast-jack') +os.system('./configure; make; sudo make install') -user = raw_input('Give a user to use the TeleCaster system : ') -print 'Installing...' +# installing deefuzzer +os.chdir(app_dir + '/tools/deefuzzer') +os.system('sudo python setup.py install') -os.system('cp -ra ./* ' + install_dir + os.sep) -os.system('rm -rf ' + install_dir + os.sep + 'tools/edcast-jack') -os.system('rm -rf ' + install_dir + os.sep + 'tools/deefuzzer') +os.chdir(app_dir) +install_dir = '/var/www/telecaster' +if os.path.exists(install_dir): + shutil.rmtree(install_dir) +shutil.copytree(current_dir, install_dir,ignore=shutil.ignore_patterns('edcast-jack*', 'deefuzzer*', '*.svn*')) +os.system('chown -R ' + user + ':' + user + ' ' + install_dir) -etc_dir = '/etc' -conf_dir = etc_dir + os.sep + 'telecaster' +conf_dir = '/etc/telecaster' if not os.path.exists(conf_dir): - os.mkdir(conf_dir) - os.system('cp -ra ./conf/etc/* ' + etc_dir + os.sep) - os.system('chown -R root:root ' + etc_dir) + shutil.copytree('conf'+conf_dir, conf_dir) + +daemons = ['jackd', 'vncserver'] +init_dir = '/etc/init.d/' +conf_dir = '/etc/default/' +for daemon in daemons: + shutil.copy('conf'+init_dir+daemon, init_dir) + shutil.copy('conf'+conf_dir+daemon, conf_dir) -init_dir = '/etc/rc2.d' -init_link = init_dir + os.sep + 'S97jackd' +init_link = '/etc/rc2.d/S97jackd' if not os.path.exists(init_link): - os.system('ln -s /etc/init.d/jackd ' + init_link) + os.symlink('/etc/init.d/jackd ', init_link) -init_link = init_dir + os.sep + 'S99vncserver' +init_link = '/etc/rc2.d/S99vncserver' if not os.path.exists(init_link): - os.system('ln -s /etc/init.d/vncserver ' + init_link) - -os.system('chown -R ' + user + ':' + user + ' ' + install_dir) -home = os.sep + 'home' + os.sep + user + os.sep -home_dirs = ['fluxbox', 'vnc'] + os.symlink('/etc/init.d/vncserver ', init_link) +home_dirs = ['fluxbox', 'vnc'] for dir in home_dirs: - home_dir = home + '.' + dir + home_dir = home + '/.' + dir if not os.path.exists(home_dir): - os.mkdir(home_dir) - os.system('cp ' + conf_dir + os.sep + 'home' + os.sep + dir + '/* ' + home_dir) + shutil.copytree('conf'+home_dir, home_dir) os.system('chown -R ' + user + ':' + user + ' ' + home_dir) -#var_dir = '/var/www/telecaster' -#if not os.path.exists(var_dir): -# os.system('ln -s ' + install_dir + ' ' + var_dir) +apache_conf = '/etc/apache2/sites-available/telecaster.conf' +if not os.path.exists(apache_conf): + shutil.copy('conf'+apache_conf, apache_conf) +os.system('/etc/init.d/apache2 reload') print """ Installation successfull ! - Now configure your apache VirtualHost to get TeleCaster in your browser. - Please see conf/etc/apache2/default and README for more infos. + + Now, please : + - configure your telecaster editing /etc/telecaster/telecaster.xml + - configure your apache VirtualHost editing /etc/apache2/sites-available/telecaster.conf + + And use the TeleCaster system browsing http://localhost/telecaster/telecaster.py + + See README for more infos. """ -- 2.39.5