#!/usr/bin/perl ###################################################################### # # # (c) Anthony G. Basile, June 3, 2002 # # # # Server proxy. # # # ###################################################################### $ConfigFile = 'proxies.conf' ; open( CONFIG, '<' . $ConfigFile ) or die "Can't open $ConfigFile: $!\n" ; while () { $Line = $_ ; chomp($Line) ; $Line =~ s/#.*// ; @Params = split( /:/ , $Line ) ; next unless gethostbyname($Params[1]) ; next unless $Params[2] =~ /[0-9]+/ ; next unless $Params[3] =~ /[0-9]+/ ; system("./start-service $Params[1] $Params[2] $Params[3] &") ; print "Proxying service '$Params[0]' at $Params[1]:$Params[2] " . "on port $Params[3]\n" ; } close(CONFIG) ; exit(0) ;