]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
MPFire Streaming beigebracht, zumindest m3u Files
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 3 Jul 2007 19:59:13 +0000 (19:59 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 3 Jul 2007 19:59:13 +0000 (19:59 +0000)
VPN-Watch nochmal angepasst
DHCP Start Delay kleiner gesetzt
UpdateBooster um ein paar Icons bereichert
Favicon transparent gemacht, der FF will dennoch nicht damit

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@658 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

12 files changed:
config/mpfire/mpfire.pl
config/mpfire/webradio [new file with mode: 0644]
doc/language_issues.de
html/cgi-bin/mpfire.cgi
html/cgi-bin/updatexlrator.cgi
html/html/favicon.ico
html/html/images/tux.png [new file with mode: 0644]
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/mpfire
src/initscripts/init.d/dhcp
src/scripts/vpn-watch

index ee21f4a2a6349a1e81c6c95875c96d20d546992a..a3bfb9d7fd6c6ea005fa570b88fd8162c38de28c 100644 (file)
@@ -9,7 +9,7 @@ require "${General::swroot}/header.pl";
 
 my $filename = "";
 my %songs = "";
 
 my $filename = "";
 my %songs = "";
-my $debug = 0;
+my $debug = 1;
 
 if ($ARGV[0] eq 'scan') {
 my $command = "find ";
 
 if ($ARGV[0] eq 'scan') {
 my $command = "find ";
@@ -43,8 +43,11 @@ if ($ARGV[0] eq 'play') {
   
 if ($ARGV[0] eq 'stop') {
   my $PID =  `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{  print \$2 }'`;
   
 if ($ARGV[0] eq 'stop') {
   my $PID =  `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{  print \$2 }'`;
-  if ($debug){print "Stopping $PID\n";}
-  system("kill -KILL $PID");
+  if ( $PID ne "" ){
+    if ($debug){print "Stopping $PID\n";}
+    system("kill -KILL $PID");
+    }
+  else {&stopweb();}
   }
 
 if ($ARGV[0] eq 'volup') {
   }
 
 if ($ARGV[0] eq 'volup') {
@@ -80,6 +83,39 @@ if ($ARGV[0] eq 'next') {
   system("kill -SIGINT $PID");
   }
 
   system("kill -SIGINT $PID");
   }
 
+if ($ARGV[0] eq 'song') {
+  my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3`;
+  my @song = split(/\//,$song);
+  my $i = @song;
+  print $song[$i-1];
+  }
+
+if ($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 &");
+          }
+          else {          system("wget -qO - `wget -qO -  $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");} 
+                       } else {
+        system("wget -qO - `wget -qO -  $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &"); 
+                       }
+  }
+
+if ($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);
   my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
 sub getSongInfo(){
   my $mp3 = MP3::Tag->new($filename);
   my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
diff --git a/config/mpfire/webradio b/config/mpfire/webradio
new file mode 100644 (file)
index 0000000..b7bc5aa
--- /dev/null
@@ -0,0 +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
index 5e89b1a3d95e18c3e55f879f2adfc7634c2705e3..11216b3cc250c95489dc139ac707f6c7a3811528 100644 (file)
@@ -375,7 +375,6 @@ WARNING: translation string unused: urlfilter update results
 WARNING: translation string unused: use
 WARNING: translation string unused: used memory
 WARNING: translation string unused: used swap
 WARNING: translation string unused: use
 WARNING: translation string unused: used memory
 WARNING: translation string unused: used swap
-WARNING: translation string unused: user cpu
 WARNING: translation string unused: user cpu usage
 WARNING: translation string unused: view log
 WARNING: translation string unused: vpn on blue
 WARNING: translation string unused: user cpu usage
 WARNING: translation string unused: view log
 WARNING: translation string unused: vpn on blue
index 4716426aea86026825fd89eed42a168fd162f63d..dcf6c17649585bd60666d0561629350763466528 100644 (file)
@@ -33,11 +33,9 @@ close(DATEI);
 &Header::showhttpheaders();
 &Header::getcgihash(\%mpfiresettings);
 
 &Header::showhttpheaders();
 &Header::getcgihash(\%mpfiresettings);
 
-&Header::openpage($Lang::tr{'mpfire'}, 1, '');
+&Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120'>");
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
-sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );}
-
 ############################################################################################################################
 ######################################## Scanne Verzeichnisse nach Mp3 Dateien #############################################
 
 ############################################################################################################################
 ######################################## Scanne Verzeichnisse nach Mp3 Dateien #############################################
 
@@ -48,11 +46,13 @@ delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresett
 system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
 }
 
 system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
 }
 
-if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\""); print $mpfiresettings{'FILE'};}
+if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
 if ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");}
 if ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");}
 if ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");}
 if ( $mpfiresettings{'ACTION'} eq ">>" ){system("/usr/local/bin/mpfirectrl next");}
 if ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");}
 if ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");}
 if ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");}
 if ( $mpfiresettings{'ACTION'} eq ">>" ){system("/usr/local/bin/mpfirectrl next");}
+if ( $mpfiresettings{'ACTION'} eq "stopweb" ){system("/usr/local/bin/mpfirectrl stopweb");}
+if ( $mpfiresettings{'ACTION'} eq "playweb" ){system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
 if ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup 5");}
 if ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");}
 if ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");}
 if ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup 5");}
 if ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");}
 if ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");}
@@ -119,7 +119,7 @@ $mpfiresettings{'SHOWLIST'} = "off";
 if ( $message ne "" )  {       print "<font color='red'>$message</font>"; }
 
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire scanning'});
 if ( $message ne "" )  {       print "<font color='red'>$message</font>"; }
 
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire scanning'});
-       
+
 print <<END
 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
 <table width='95%' cellspacing='0'>
 print <<END
 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
 <table width='95%' cellspacing='0'>
@@ -135,8 +135,11 @@ END
 ;
 &Header::closebox();
 
 ;
 &Header::closebox();
 
+my $song = qx(/usr/local/bin/mpfirectrl song);
+if ( $song eq "" ){$song = "None";}
+
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire controls'});
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire controls'});
-print "<table width='95%' cellspacing='0'><tr>";
+print "<table width='95%' cellspacing='0'><tr bgcolor='$color{'color20'}'><td colspan='5' align='center'><marquee behavior='alternate' scrollamount='1' scrolldelay='5'><font color=red>-= $song =-</font></marquee></td></tr><tr><td colspan='5'><br/></td></tr><tr>";
 print <<END
     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='x' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='||' /><input type='image' alt='$Lang::tr{'pause'}' title='$Lang::tr{'pause'}' src='/images/media-playback-pause.png' /></form></td>
 print <<END
     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='x' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='||' /><input type='image' alt='$Lang::tr{'pause'}' title='$Lang::tr{'pause'}' src='/images/media-playback-pause.png' /></form></td>
@@ -245,8 +248,6 @@ print "</table></form>";
 
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'});
 
 
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'});
 
-;
-
 open(DATEI, "<${General::swroot}/mpfire/playlist") || die "Could not open playlist";
 my @playlist = <DATEI>;
 close(DATEI);
 open(DATEI, "<${General::swroot}/mpfire/playlist") || die "Could not open playlist";
 my @playlist = <DATEI>;
 close(DATEI);
@@ -264,5 +265,30 @@ END
 ;
 &Header::closebox();
 
 ;
 &Header::closebox();
 
+&Header::openbox('100%', 'center', $Lang::tr{'mpfire webradio'});
+
+open(DATEI, "<${General::swroot}/mpfire/webradio") || die "Could not open playlist";
+my @webradio = <DATEI>;
+close(DATEI);
+
+print <<END
+<table width='95%' cellspacing='0'>
+<tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'webradio playlist'}</b></td></tr>
+<tr><td>Stream</td><td colspan='2'></td></tr>
+END
+;
+foreach (@webradio){
+ my @stream = split(/\|/,$_);
+ print <<END
+ <tr><td>$stream[1]</td>
+     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='stopweb' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
+     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='FILE' value='$stream[0]' /><input type='hidden' name='ACTION' value='playweb' /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
+</tr>
+END
+;
+ }
+print "</table>";
+&Header::closebox();
+
 &Header::closebigbox();
 &Header::closepage();
 &Header::closebigbox();
 &Header::closepage();
index 5fc631a554ba1e58d81e64c5df27f88683856359..4b2082ada8e198c7de3b0ca07ec9bad6f7495d0c 100644 (file)
@@ -464,10 +464,10 @@ END
                        print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'IPFire')
                {
                        print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'IPFire')
                {
-                       print "<img src='/images/updxl-src-ipfire.gif' alt='IPFire'}' />&nbsp;</td>\n";
+                       print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire'}' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'Linux')
                {
                } elsif ($metadata[1] eq 'Linux')
                {
-                       print "<img src='/images/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
+                       print "<img src='/images/tux.png' alt='Linux'}' />&nbsp;</td>\n";
                } else
                {
                        print "<img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' />&nbsp;</td>\n";
                } else
                {
                        print "<img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' />&nbsp;</td>\n";
@@ -552,10 +552,10 @@ print <<END
        </tr>
        <tr>
                <td class='base' colspan='2'>&nbsp;</td>
        </tr>
        <tr>
                <td class='base' colspan='2'>&nbsp;</td>
-               <td align='center'><img src='/images/updxl-src-ipfire.gif' alt='IPFire' /></td>
+               <td align='center'><img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /></td>
                <td class='base'>IPFire</td>
                <td class='base'>&nbsp;</td>
                <td class='base'>IPFire</td>
                <td class='base'>&nbsp;</td>
-               <td align='center'><img src='/images/updxl-src-linux.gif' alt='Linux' /></td>
+               <td align='center'><img src='/images/tux.png' alt='Linux' /></td>
                <td class='base'>Linux</td>
                <td class='base'>&nbsp;</td>
                <td align='center'><img src='/images/updxl-src-avast.gif' alt='Avast' /></td>
                <td class='base'>Linux</td>
                <td class='base'>&nbsp;</td>
                <td align='center'><img src='/images/updxl-src-avast.gif' alt='Avast' /></td>
index 1bab5b0de401dd799f468287ce2c79954a7f46b2..52da262f76e9a6b7bd9e07a0229013bc2beae51f 100644 (file)
Binary files a/html/html/favicon.ico and b/html/html/favicon.ico differ
diff --git a/html/html/images/tux.png b/html/html/images/tux.png
new file mode 100644 (file)
index 0000000..a6b4e92
Binary files /dev/null and b/html/html/images/tux.png differ
index 0408248293afaff6223fb9b68a484ef44d680cde..2d9bc39e7b54c32d10de745384ff76f98a1c27e2 100644 (file)
 'mpfire playlist' => 'MPFire Playlist',
 'mpfire scanning' => 'Nach neuen Dateien suchen',
 'mpfire songs' => 'MPFire Songliste',
 'mpfire playlist' => 'MPFire Playlist',
 'mpfire scanning' => 'Nach neuen Dateien suchen',
 'mpfire songs' => 'MPFire Songliste',
+'mpfire webradio' => 'MPFire Webradio',
 'my new share' => 'Meine neue Freigabe',
 'name' => 'Name',
 'name is invalid' => 'Name ist ungültig',
 'my new share' => 'Meine neue Freigabe',
 'name' => 'Name',
 'name is invalid' => 'Name ist ungültig',
 'used memory' => 'Genutzter Speicher',
 'used swap' => 'Genutzter Swap',
 'user' => 'Benutzer',
 'used memory' => 'Genutzter Speicher',
 'used swap' => 'Genutzter Swap',
 'user' => 'Benutzer',
-'user cpu' => 'Benutzer CPU Nutzung',
-'user cpu usage' => 'Benutzer CPU',
+'user cpu usage' => 'Benutzer CPU Nutzung',
 'user log' => 'Benutzer Log',
 'user proxy logs' => 'Benutzer Proxy Log',
 'username' => 'Benutzername:',
 'user log' => 'Benutzer Log',
 'user proxy logs' => 'Benutzer Proxy Log',
 'username' => 'Benutzername:',
 'web proxy' => 'Web-Proxy',
 'web proxy configuration' => 'Web-Proxy-Konfiguration',
 'web server' => 'Web-Server',
 'web proxy' => 'Web-Proxy',
 'web proxy configuration' => 'Web-Proxy-Konfiguration',
 'web server' => 'Web-Server',
+'webradio playlist' => 'Webradio Playlist',
 'website' => 'Website',
 'wednesday' => 'Mittwoch',
 'week' => 'Woche',
 'website' => 'Website',
 'wednesday' => 'Mittwoch',
 'week' => 'Woche',
index e92d9015d25b4558d4a93be44b0b07311ff0cab5..63f61f5bfdd83d749963fafff940923f72ab6cca 100644 (file)
 'mpfire playlist' => 'MPFire Playlist',
 'mpfire scanning' => 'Scan for new files',
 'mpfire songs' => 'MPFire songlist',
 'mpfire playlist' => 'MPFire Playlist',
 'mpfire scanning' => 'Scan for new files',
 'mpfire songs' => 'MPFire songlist',
+'mpfire webradio' => 'MPFire Webradio',
 'my new share' => 'My new share',
 'name' => 'Name',
 'name is invalid' => 'Name is invalid',
 'my new share' => 'My new share',
 'name' => 'Name',
 'name is invalid' => 'Name is invalid',
 'web proxy' => 'Web proxy',
 'web proxy configuration' => 'Web proxy configuration',
 'web server' => 'Web server',
 'web proxy' => 'Web proxy',
 'web proxy configuration' => 'Web proxy configuration',
 'web server' => 'Web server',
+'webradio playlist' => 'Webradio Playlist',
 'website' => 'Website',
 'wednesday' => 'Wednesday',
 'week' => 'Week',
 'website' => 'Website',
 'wednesday' => 'Wednesday',
 'week' => 'Week',
index fb04dbb00542f5f34926cbb512d7dce533233233..b12dc392929b8a607af0c3b9eaceaa9f6104cf1e 100644 (file)
@@ -66,4 +66,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        touch /var/ipfire/mpfire/db/songs.db
        chown nobody.nobody /var/ipfire/mpfire/{settings,playlist}      
        install -v -m 755 $(DIR_SRC)/config/mpfire/mpfire.pl /var/ipfire/mpfire/bin
        touch /var/ipfire/mpfire/db/songs.db
        chown nobody.nobody /var/ipfire/mpfire/{settings,playlist}      
        install -v -m 755 $(DIR_SRC)/config/mpfire/mpfire.pl /var/ipfire/mpfire/bin
+       install -v -m 644 $(DIR_SRC)/config/mpfire/webradio /var/ipfire/mpfire/
        @$(POSTBUILD)
        @$(POSTBUILD)
index b9bd42442eaf24c2fc7233d10cf587fc6d288554..2da8d64dfc081726d4db84cd42ad420e4fd8a9f8 100644 (file)
@@ -25,7 +25,7 @@ case "$1" in
                boot_mesg "Starting DHCP Server..."
                loadproc /usr/sbin/dhcpd -q ${devices}
                
                boot_mesg "Starting DHCP Server..."
                loadproc /usr/sbin/dhcpd -q ${devices}
                
-               (sleep 20 && chmod 644 /var/run/dhcpd.pid) & # Fix because silly dhcpd creates its pid with mode 640
+               (sleep 5 && chmod 644 /var/run/dhcpd.pid) & # Fix because silly dhcpd creates its pid with mode 640
                ;;
 
        stop)
                ;;
 
        stop)
index 3abb7f5c1f3613066816d7a87aefc09b7f4ee36d..c900c23dc895f285ea418472dc2ea8af7c49a86d 100755 (executable)
@@ -11,7 +11,13 @@ my $i = 0;
 my $file = "/var/run/vpn-watch.pid";
 my $debug = 0;
 
 my $file = "/var/run/vpn-watch.pid";
 my $debug = 0;
 
-if ( -e $file ){logger("There my be another vpn-watch runnning $file exists, vpn-watch will not start.");exit 1;}
+if ( -e $file ){
+  logger("There my be another vpn-watch runnning because $file exists, vpn-watch will try kill the process.");
+  open(FILE, "<$file");
+    my $PID = <FILE>;
+    close(FILE);
+    system("kill -9 $PID");
+  }
 if ($debug){logger("Call of vpn-watch pid not is not existing.");}
 
 system("echo $$ > $file");
 if ($debug){logger("Call of vpn-watch pid not is not existing.");}
 
 system("echo $$ > $file");
@@ -20,7 +26,7 @@ while ( $i == 0){
  sleep(300);
   if ($debug){logger("We will wait 300 seconds before next action.");}
   
  sleep(300);
   if ($debug){logger("We will wait 300 seconds before next action.");}
   
-  if (open(FILE, "${General::swroot}/vpn/config")) {
+  if (open(FILE, "<${General::swroot}/vpn/config")) {
     @vpnsettings = <FILE>;
     close(FILE);
     unless(@vpnsettings) {exit 1;}
     @vpnsettings = <FILE>;
     close(FILE);
     unless(@vpnsettings) {exit 1;}