neat & nifty :-)
FWIW: I'd put the initialization stuff in a function and put a HUP signal handler in place to reread the ini on HUP.
Could that way, and with a bit of rc-script theft and rewriting, be easily used as a surveillance-daemon on a security-auditors machine.
Well, just my 0.02EUR
regards,
tomte
UPDATE: just in case you think I'm stupid: a fullfledged IDS isn't feasible for all of us for several reasons, and therefore a script like this, maybe extended to check vital services (like http), is IMHO a great help if you're an underpaid coder with the additional burden of security/availabilty checking....;-)
Update_II: s/your/you're/