View Single Post


Old
  Post #1 (permalink)   01-23-2002, 11:21 AM
hypernatic.net
 
Posts: n/a

Status:
Hi I made a script that keeps me uptodate of what happens on my server:

Here is the shell part:
Quote:
#!/bin/sh
###################
# (C) 2002 hypernatic.net
###################

mailq >spamlist.txt
locate mp3|locate .r01 >warezlist.txt
ps aux >psauxlist.txt

./syscheck.pl

rm -f *.txt
Now the perl script that mails it all
Quote:
#!/usr/bin/perl
###################
# (C) 2002 hypernatic.net
###################

open (mque,"./spamlist.txt");
@mque= <mque>;
close (mque);

open (warez,"./warezlist.txt");
@warez= <warez>;
close (warez);

open (@psaux,"./psauxlist.txt");
@psaux = <@psaux>;
close (@psaux);

print "@psaux";

# Open The Mail Program
open(MAIL,"|/usr/sbin/sendmail -t");

print MAIL "To: user\@host.com\n";
print MAIL "From: root\@localhost (SysCheck Daemon)\n";
print MAIL "Subject: SYSCHECK REPORT\n\n";
print MAIL "################################################# ###############################\n";
print MAIL "|------------------------------[ SPAM REPORT ]------------------------------|\n\n";
print MAIL "@mque\n\n";
print MAIL "|------------------------------[ SPAM REPORT ]------------------------------|\n\n";
print MAIL "################################################# ###############################\n\n";
print MAIL "|-----------------------------[ WAREZ REPORT ]------------------------------|\n\n";
print MAIL "@warez\n\n";
print MAIL "|-----------------------------[ WAREZ REPORT ]------------------------------|\n\n";
print MAIL "################################################# ###############################\n\n";
print MAIL "|---------------------------[ PROCESSES REPORT ]------------------------------|\n\n";
print MAIL "@psaux\n\n";
print MAIL "|---------------------------[ PROCESSES REPORT ]------------------------------|\n";
print MAIL "################################################# ###############################\n";
close (MAIL);
Now for some reason, it WONT send me the @psaux....

Does anyone know WHY?