jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [shoutcast/] [setup.pl] - Blame information for rev 11

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: setup.pl,v 1.8 2004/07/12 07:50:15 bernisys Exp $
4 
5# include PERL libraries
6use strict;
7use warnings;
8use diagnostics;
9 
10# include HotSaNIC libraries
11use lib "../../lib";
12use lib "./platform";
13use HotSaNICparser;
14 
15use HotSaNIClog;
16use common;
17 
18$|=1;
19 
20(my $VERSION = '$Revision: 1.8 $') =~ s/.*(\d+\.\d+).*/$1/;
21(my $IDENTIFIER = '$Id: setup.pl,v 1.8 2004/07/12 07:50:15 bernisys Exp $') =~ s/.*,v (.*) \$/$1/;
22 
23my $MODNAME=HotSaNICparser::get_module_name();
24my %MODCONF=HotSaNICmod::common::configure();
25my $OUTFILE="settings.new";
26if ( ! -e "settings" ) { $OUTFILE="settings"; }
27open OUTFILE,">$OUTFILE" || die "could not open ".HotSaNICparser::get_module_name()." settings file for writing.\n";
28 
29if (@{$MODCONF{STREAM}}) { $MODCONF{STREAM}="STREAM=\"".join("\"\nSTREAM=\"",@{$MODCONF{STREAM}})."\""; }
30else { $MODCONF{STREAM}=""; }
31 
32print OUTFILE "# SHORT DESCRIPTION
33#
34# configure the http-retrieval method
35# everything other than \"lynx\" will use the perl-module LWP::Simple,
36# which is the default.
37#
38# METHOD=[lynx|.*]
39#
40# example:
41# METHOD=lynx
42#
43METHOD=\"$MODCONF{METHOD}\"
44 
45# Configure some shoutcast streams you want to monitor:
46# multiple lines are of course allowed.
47#
48# STREAM=<URL>,<description>,<bitrate>
49#
50# NOTE: <bitrate> will be in BITS/s not in KILObits/s !
51# example:
52# STREAM=http://some.host.org/stats.html,testhost,128000
53#
54$MODCONF{STREAM}
55";
56 
57close OUTFILE;
58 
59if ($OUTFILE eq "settings.new") {
60 HotSaNICparser::backup_file("settings");
61 rename "settings.new","settings";
62 }
63 
64print "Please check the settings file and adapt it to satisfy your needs.\n";
65 

Powered by WebSVN 2.2.1