I am trying to setup a system where if the Linux server is going down for a restart, PHP will automatically displaying warning messages saying for example.. "Server going down for restart in X minutes". I noticed after scheduling a restart that Linux occasionally warns me about that shutdown while i'm connected to the shell. I may be working inside a shell and a message appears saying "System going down for restart in 200 minutes". Basically my question here is, how can I redirect that message to a php script that is using an event driven framework such as prggmr waiting to receive that information?
This is just the way I thought of doing this. If anyone has a better solution to this question, please let me know.