Script to daily email APF status

by Tweak on June 15, 2009
in Security, Servers

You are running APF on your server, but sometimes you think “is APF running fine ?
This script sends you an email with APF satus.

Log in to your server as root

Create the script:
nano apfstatus.sh

Put this on the file:
#!/bin/bash

tail -200 /var/log/apf_log | mail -s "APF Status" youemail@domain.com

Save and Exit
Ctrl+X and Y

Make it executable:
chmod 755 apfstatus.sh

Move it to “/etc/cron.daily” folder:
mv apfstatus.sh /etc/cron.daily

You will receive now a daily email with APF status.

How to Install APF ?

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

Comments are closed.