I run the following once an hour out of cron on my FreeBSD mailserver,
the echos are merely stuff the log and aren't necessary. You could
easily delete them:
$ cat /root/spamdwatch.sh
#!/bin/sh
if ps -p `cat /var/run/spamd/spamd.pid` > /dev/null; then
echo spamd is running
else
echo spamd i
I am trying to write a script that takes an array of server names and
pings their spamd to make sure that it is still alive.
$t = new Net::Telnet(Prompt=>'//', Port=> 783,
output_log=>"out_log.txt", input_log=>"in_log.txt");
for($i=0;$i<$count;$i++) {
$t -> open(@server_list[$i]);
$line =