UPDATE FOR POOL OWNERSI modded the script so it automatically anounces on your pools MOTD that registrations have been closed temporarily, and why.
http://pastebin.com/ZGjD3HXuPut this in your scripts folder in MPOS as 51_percent_check.php owned by root:root and chmod'd 755 then "sudo crontab -e" and add a line:
* * * * * php /var/www/MPOS/scripts/51_percent_check.php
Now your pool will automatically close and reopen registrations depending on your share of the network hashrate, no more having to keep checking on it!
Also, add a line to /var/www/MPOS/.gitignore like:
/scripts/51_percent_check.php
So that git won't pull down updates over the top of it, with the original version (which doesn't update the MOTD, and only closes reg once you've already 51%'d the network)
Someone better at php (and more patient
might want to improve it by building in some hysteresis so it doesn't keep closing/reopening every minute when it's right around 40%
If you do, please post it, I'd like to do that but I don't have the time to hack that together right now, but this ought to at least do the job in a quick and dirty way.