I’ve been working the past couple weeks on updating the quota_near script. In the last edition, the bash script would get hung on an awk command because it would just keep reading. So I’ve updated the script, and written it in python!
It lives in /home/sysadmin/quota_near.py and /root/bin/quota_near.py with the email being sent in /root/bin/quota_near_email
It uses MIMEText to send emails with Python. And uses the ‘repquota /students’ command to figure out everyone’s quotas.
I’m pretty sure that it can easily be combined to also serve as quota_over by adding a couple lines and the email format. So I’ve done most of that too.
Now to put this in the actual cronjob!