PGP problems

Steve Lamb pmmail@rpglink.com
Wed, 2 Aug 2000 11:21:22 -0700


On Wed, Aug 02, 2000 at 08:11:20PM +0200, Alexander Sarras wrote:
> Which only shows tat you _should_ start using your computer for serious
> things, not playing...

    Nah, just means that I'll just start using game on and game off again is
all..

#!/usr/bin/perl
use Net::Telnet();

#variables
$pidfile = '/var/run/inetd.pid';
$on = '1.2'; # Game on, mail off
$off = '1.1'; # Game off, mail on

chdir('/etc');
if ($ARGV[0] eq "on"){
  print("Shutting down smtp server\n");
  system("co -u1.2 inetd.conf");
}
elsif ($ARGV[0] eq "off"){
  print("Reactivating server.\n");
  system("co -u1.1 inetd.conf");
  print("Flushing remote queues.\n");
  $telnet = new Net::Telnet(Port=>25);
  $telnet->open('gigo.com');
  $telnet->getline();
  $telnet->print("ETRN rpglink.com");
  $response = $telnet->getline();
  unless ($response =~ m/^250/){
    print("Command denied.\n$response\n");
  }
}
open(IN,$pidfile) or die("Unable to open $pidfile: $!\n");
chomp($inetdpid = <IN>);
close(IN);
print("Restarting inetd.\n");
system("kill -HUP $inetdpid");

    ;)

    Ah, the little things I do for my gaming.  Y'all can use my bandwidth when
I am programming locally.  :P
 
-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------