diff --git a/config/backup/include b/config/backup/include index 17588a269..67fd29e9a 100644 --- a/config/backup/include +++ b/config/backup/include @@ -5,4 +5,16 @@ /etc/passwd /etc/shadow /etc/group - +/etc/hosts +/etc/localtime +/etc/httpd/server.crt +/etc/httpd/server.csr +/etc/httpd/server.key +/etc/rc.d/rc.local +/etc/rc.d/rc.firewall.local +/etc/ssh/ssh_host_dsa_key +/etc/ssh/ssh_host_dsa_key.pub +/etc/ssh/ssh_host_key +/etc/ssh/ssh_host_key.pub +/etc/ssh/ssh_host_rsa_key +/etc/ssh/ssh_host_rsa_key.pub diff --git a/config/cfgroot/backup-exclude b/config/cfgroot/backup-exclude deleted file mode 100644 index 19f28284a..000000000 --- a/config/cfgroot/backup-exclude +++ /dev/null @@ -1,21 +0,0 @@ -var/ipfire/backup/*.system -var/ipfire/backup/backup.key -var/ipfire/backup/sets -var/ipfire/countries.pl -var/ipfire/dhcpc -var/ipfire/eciadsl/modems.db -var/ipfire/eciadsl/firmware00.bin -var/ipfire/header.pl -var/ipfire/general-functions.pl -var/ipfire/lang.pl -var/ipfire/key -var/ipfire/langs -var/ipfire/patches -var/ipfire/ppp/fake-resolv.conf -var/ipfire/red -var/ipfire/time/counter -var/ipfire/firewall/protocols.pl -var/ipfire/firewall/defaultservices -var/ipfire/firewall/icmptypes -var/ipfire/addon-lang -var/ipfire/net-traffic \ No newline at end of file diff --git a/config/cfgroot/backup-exclude.hardware b/config/cfgroot/backup-exclude.hardware deleted file mode 100644 index 5c0360af6..000000000 --- a/config/cfgroot/backup-exclude.hardware +++ /dev/null @@ -1 +0,0 @@ -var/ipfire/ethernet/settings diff --git a/config/cfgroot/backup-include b/config/cfgroot/backup-include deleted file mode 100644 index ab19ddcd7..000000000 --- a/config/cfgroot/backup-include +++ /dev/null @@ -1,16 +0,0 @@ -/etc/passwd -/etc/shadow -/etc/hosts -/etc/localtime -/etc/httpd/server.crt -/etc/httpd/server.csr -/etc/httpd/server.key -/etc/rc.d/rc.local -/etc/rc.d/rc.firewall.local -/etc/ssh/ssh_host_dsa_key -/etc/ssh/ssh_host_dsa_key.pub -/etc/ssh/ssh_host_key -/etc/ssh/ssh_host_key.pub -/etc/ssh/ssh_host_rsa_key -/etc/ssh/ssh_host_rsa_key.pub -/var/ipfire/ diff --git a/config/mpfire/mpfire.pl b/config/mpfire/mpfire.pl index 17006db3b..b0de0e1f1 100644 --- a/config/mpfire/mpfire.pl +++ b/config/mpfire/mpfire.pl @@ -9,7 +9,7 @@ require "${General::swroot}/header.pl"; my $filename = ""; my %songs = ""; -my $debug = 1; +my $debug = 0; if ($ARGV[0] eq 'scan') { my $command = "find "; @@ -36,16 +36,24 @@ if ($ARGV[0] eq 'getdb') { print %songs; } elsif ($ARGV[0] eq 'play') { + &checkplaylist(); if ($debug){print "Yes we are called and we will play $ARGV[1]\n";} system("/usr/bin/mpg123 -b 1024 --aggressive -q \"$ARGV[1]\" 2>/dev/null >/dev/null &"); } elsif ($ARGV[0] eq 'stop') { - my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`; - if ( $PID ne "" ){ - if ($debug){print "Stopping $PID\n";} - system("kill -KILL $PID"); - } - else {&stopweb();} + my $PID = `ps -ef \| grep wget \| grep EXTM3U \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + if ( $PID ne '' ){ + if ($debug){print "Stopping $PID\n";} + system("kill -KILL $PID"); + my $PID = `ps -ef \| grep "mpg123 -b 1024 --aggressive -Zq -" \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + if ($debug){print "Killing Process $PID\n";} + system("kill -KILL $PID"); + } + else{ + my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + if ($debug){print "Stopping $PID\n";} + system("kill -KILL $PID"); + } } elsif ($ARGV[0] eq 'volup') { if ($debug){print "Increasing Volume\n";} @@ -56,16 +64,17 @@ elsif ($ARGV[0] eq 'voldown') { system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null"); } elsif ($ARGV[0] eq 'playall') { + &checkplaylist(); if ($debug){print "Playing everything\n";} system("/usr/bin/mpg123 -b 1024 --aggressive -Zq@ /var/ipfire/mpfire/playlist 2>/dev/null >/dev/null &"); } elsif ($ARGV[0] eq 'pause') { - my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`; + my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; if ($debug){print "Pausing Process $PID\n";} system("kill -STOP $PID"); } elsif ($ARGV[0] eq 'resume') { - my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`; + my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; if ($debug){print "Resuming Process $PID\n";} system("kill -CONT $PID"); } @@ -80,35 +89,30 @@ elsif ($ARGV[0] eq 'song') { my $i = @song; if ( $i == 0 ){ my $song = `ps -ef \| grep wget \| grep EXTM3U \| grep -v "sh -c"`; - my @song = split(/\//,$song); - print $song[2]; + my @song = split(/,/,$song); + print $song[1]; } else { print $song[$i-1];} } elsif ($ARGV[0] eq 'playweb') { &General::readhash("${General::swroot}/proxy/settings", \%proxysettings); - if ($debug){print "Playing webstream\n";} + if ($proxysettings{'UPSTREAM_PROXY'}) { if ($proxysettings{'UPSTREAM_USER'}) { - system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &"); + &checkm3uproxy(); + if ($debug){print "Playing webstream\n";} + system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &"); } - else { system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");} + else { + &checkm3uproxyuser(); + if ($debug){print "Playing webstream\n";} + system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");} } else { - system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &"); + &checkm3u(); + if ($debug){print "Playing webstream\n";} + system("wget -qO - `wget -qO - http://$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &"); } } -elsif ($ARGV[0] eq 'stopweb') { - &stopweb(); - } - -sub stopweb(){ - my $PID = `ps -ef | grep wget | grep EXTM3U | head -1 | awk '{ print \$2 }'`; - if ($debug){print "Stopping $PID\n";} - system("kill -KILL $PID"); - my $PID = `ps -ef | grep "mpg123 -b 1024 --aggressive -Zq -" | head -1 | awk '{ print \$2 }'`; - if ($debug){print "Killing Process $PID\n";} - system("kill -KILL $PID"); - } sub getSongInfo(){ my $mp3 = MP3::Tag->new($filename); @@ -127,3 +131,24 @@ sub getExistingSongs(){ $songs{$Zeile[0]} = "|".$Zeile[1]."|".$Zeile[2]."|".$Zeile[3]."|".$Zeile[4]."|".$Zeile[5]."|".$Zeile[6]."|".$Zeile[7]."|".$Zeile[8]."|".$Zeile[9]."|".$Zeile[10]."|".$Zeile[11]."\n"; } } + +sub checkplaylist(){ + my $Datei = "/var/ipfire/mpfire/playlist"; + my @Info = stat($Datei); + if ( $Info[7] eq '' ){print "There is no playlist";exit(1);} +} + +sub checkm3u(){ + my $Datei = system("wget -q --spider http://$ARGV[1]"); + if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);} +} + +sub checkm3uproxy(){ + my $Datei = system("wget -q --spider http://$ARGV[1]"); + if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);} +} + +sub checkm3uproxyuser(){ + my $Datei = system("wget -q --spider http://$ARGV[1]"); + if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);} +} diff --git a/config/mpfire/webradio b/config/mpfire/webradio index b7bc5aa1f..ea84da943 100644 --- a/config/mpfire/webradio +++ b/config/mpfire/webradio @@ -1,5 +1,5 @@ -http://www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio -http://metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive -http://www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European -http://www.bigfm.de/webradio/bigfm-high.m3u|BigFM -http://www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken +www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio +metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive +www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European +www.bigfm.de/webradio/bigfm-high.m3u|BigFM +www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken diff --git a/config/rootfiles/common/configroot b/config/rootfiles/common/configroot index 3ab189bf1..57884c6af 100644 --- a/config/rootfiles/common/configroot +++ b/config/rootfiles/common/configroot @@ -4,11 +4,6 @@ var/ipfire/addon-lang var/ipfire/auth #var/ipfire/auth/users var/ipfire/backup -#var/ipfire/backup/exclude.hardware -#var/ipfire/backup/exclude.system -#var/ipfire/backup/exclude.user -#var/ipfire/backup/include.system -#var/ipfire/backup/include.user var/ipfire/ca var/ipfire/certs #var/ipfire/certs/index.txt diff --git a/config/rootfiles/packages/mpfire b/config/rootfiles/packages/mpfire index 0f554dfe9..11be82451 100644 --- a/config/rootfiles/packages/mpfire +++ b/config/rootfiles/packages/mpfire @@ -8,8 +8,8 @@ var/ipfire/mpfire/db var/ipfire/mpfire/db/songs.db var/ipfire/mpfire/playlist var/ipfire/mpfire/settings -usr/lib/perl5/site_perl/5.8.8/MP3/Info.pm -usr/lib/perl5/site_perl/5.8.8/MP3/Tag.pm -usr/lib/perl5/site_perl/5.8.8/MP3/Tag/File.pm -usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v1.pm -usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v2.pm +usr/lib/perl5/5.8.8/MP3/Info.pm +usr/lib/perl5/5.8.8/MP3/Tag.pm +usr/lib/perl5/5.8.8/MP3/Tag/File.pm +usr/lib/perl5/5.8.8/MP3/Tag/ID3v1.pm +usr/lib/perl5/5.8.8/MP3/Tag/ID3v2.pm diff --git a/config/tripwire/twpol.txt b/config/tripwire/twpol.txt index 01e6c1ed2..96d5bd9d8 100644 --- a/config/tripwire/twpol.txt +++ b/config/tripwire/twpol.txt @@ -27,10 +27,10 @@ SIG_HI = 100 ; # Critical files that are significant point $(TWDB) -> $(SEC_CRIT) ; $(TWPOL)/tw.pol -> $(SEC_CRIT) -i ; $(TWPOL)/tw.cfg -> $(SEC_CRIT) -i ; - $(TWLKEY)/local.key -> $(SEC_CRIT) ; + $(TWLKEY)/local.key -> $(SEC_CRIT) ; $(TWSKEY)/site.key -> $(SEC_CRIT) ; - /bin -> $(SEC_CRIT) ; + /bin -> $(SEC_CRIT) ; /boot -> $(SEC_CRIT) ; /etc -> $(SEC_CRIT) ; /lib -> $(SEC_CRIT) ; @@ -39,6 +39,7 @@ SIG_HI = 100 ; # Critical files that are significant point /sbin -> $(SEC_CRIT) ; /usr -> $(SEC_CRIT) ; !/usr/src ; + !usr/share/clamav ; /etc/mtab -> $(SEC_CONFIG) -i ; # Inode number changes on any mount/unmount #don't scan the individual reports @@ -70,5 +71,5 @@ SIG_HI = 100 ; # Critical files that are significant point /proc/mounts -> $(Device) ; /proc/filesystems -> $(Device) ; /proc/misc -> $(Device) ; - /var/log -> $(SEC_CONFIG) ; -} \ No newline at end of file + /var/log -> $(SEC_LOG) ; +} diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index c294b6369..da772663c 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -19,7 +19,7 @@ my %color = (); my %mainsettings = (); my %mpfiresettings = (); my %checked = (); -my $message = ""; +my $message = '0'; my $errormessage = ""; open(DATEI, "<${General::swroot}/mpfire/db/songs.db") || die "No Database found"; @@ -34,6 +34,8 @@ close(DATEI); sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "

END my @output = `tail /var/log/messages | grep pakfire`; @@ -135,7 +134,6 @@ print <END - ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D &Header::closebox(); &Header::closebigbox(); &Header::closepage(); diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index f7bdfa9f5..a2020c182 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -304,12 +304,12 @@ END if ( -e "/var/ipfire/cups/enable") { if ( $sambasettings{'SECURITY'} eq 'User' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdccups");refreshpage();} - else {system("/usr/local/bin/sambactrl smbsafeconfcups");refreshpage();} + else {system("/usr/local/bin/sambactrl smbsafeconfcups");} } else { if ( $sambasettings{'SECURITY'} eq 'User' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdc");refreshpage();} - else{system("/usr/local/bin/sambactrl smbsafeconf");refreshpage();} + else{system("/usr/local/bin/sambactrl smbsafeconf");} } system("/usr/local/bin/sambactrl smbreload");refreshpage(); diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index b264117e1..70b1247ba 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -25,6 +25,7 @@ 'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm', 'OVPN' => 'OpenVPN', 'OpenVPN' => 'OpenVPN', +'Pages' => 'Seiten', 'Ping' => 'Ping ', 'Remote IP' => 'Entfernte IP / Hostname (DynDNS)', 'Remote VPN IP' => 'VPN Subnetz (z.B. 10.0.10.0/255.255.255.0)', @@ -431,6 +432,7 @@ 'cipher' => 'Verschlüsselung', 'city' => 'Stadt', 'clear cache' => 'Zwischenspeicher löschen', +'clear playlist' => 'leere Playlist', 'clenabled' => 'Uhrzeit dem lokalen Netzwerk zur Verfügung stellen', 'click to disable' => 'Aktiviert (klicken, um zu deaktivieren)', 'click to enable' => 'Deaktiviert (klicken, um zu aktivieren)', @@ -1846,7 +1848,7 @@ 'vpn remote id' => 'Remote ID', 'vpn subjectaltname' => 'Subjekt Alternativer Name', 'vpn vhost' => 'Roadwarrior virtuelle IP (manchmal auch Inner-IP genannt)', -'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP ändert (DynDNS). Dies hilft DPD (Dead Peer Detection)', +'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP ändert (DynDNS).', 'waiting to synchronize clock' => 'Bitte warten, die Uhr wird synchronisiert', 'warn when traffic reaches' => 'Warnen wenn Traffic x % erreicht', 'warning messages' => 'Warnhinweise', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 077d67db9..47958db35 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -25,6 +25,7 @@ 'Number of Ports for the pie chart' => 'Number of ports for the pie chart', 'OVPN' => 'OpenVPN', 'OpenVPN' => 'OpenVPN', +'Pages' => 'Pages', 'Ping' => 'Ping :', 'Remote IP' => 'Remote IP / Hostname (DynDNS):', 'Remote VPN IP' => 'VPN Subnet (e.g. 10.0.10.0/255.255.255.0):', @@ -451,6 +452,7 @@ 'cipher' => 'Encryption:', 'city' => 'City', 'clear cache' => 'Clear Cache', +'clear playlist' => 'empty playlist', 'clenabled' => 'Provide time to local network', 'click to disable' => 'Enabled (click to disable)', 'click to enable' => 'Disabled (click to enable)', @@ -1880,7 +1882,7 @@ 'vpn remote id' => 'Remote ID', 'vpn subjectaltname' => 'Subject Alt Name', 'vpn vhost' => 'Roadwarrior virtual IP (sometimes called Inner-IP)', -'vpn watch' => 'Restart net-to-net vpn when remote peer IP changes (dyndns), it helps DPD', +'vpn watch' => 'Restart net-to-net vpn when remote peer IP changes (dyndns).', 'waiting to synchronize clock' => 'Waiting to synchronize clock', 'warn when traffic reaches' => 'Warn when traffic reaches x %', 'warning messages' => 'Warning messages',