On 140806, 15:35, Steve Totaro wrote: > Anyone have a script or example to do this? I want to run the script > every so often and then drop a call file into the outgoing folder and > call multiple numbers. I figured I would ask before wasting my time > re-inventing the wheel. > > Also, I dont want to setup nagios or any other system right now, I just > want a down and dirty df script.
df | awk 'BEGIN{pippo=1} {if (pippo == 5) { sub("%","",$5); if ($5 > 50) \
{print $5; print "Ci siamo !"; \
system("cp call.file /var/spool/asterisk/outgoing/");} } pippo++}'
Quick and dirty.
This works perfectly on a FreeBSD system.
By the way, you have to modify the first occurrence of the if statement
to match the line where you have the filesystem you care about. Yes,
it's middle august, I'm too tired and it's too hot to think of a good
regexp, sorry.
Ciao !
--
Massimiliano Stucchi, CTO & Director of Operations
WillyStudios.com - IT Consulting, Web and VoIP Services
[EMAIL PROTECTED] | Tel (+39) 0244417203 | Fax (+39) 0244417204
IT-20040, Carnate (Milano), via Carducci 9
pgpxwdQHY9zEd.pgp
Description: PGP signature
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
