a script to check if maui needs restarting