Originally Posted by stemy
I have a recently set up a Ubuntu server 9.04 and would like to have one small web page with two buttons on: Restart and shutdown.
Is this something that already exists or easy can bee made?
This could be easily set up.
1. Make a PHP form with the HTML's `action' attribute set to its own address and method="post".
2. In the PHP on this page, check if the invocation was a result of the form being submitted (check the POST variables).
3. If so, run a system command (using exec(..)) from PHP to restart/shutdown. There are several options for this, try /sbin/reboot or crontab (in the terminal type "man crontab" or "man reboot" to see the manuals for these). You will need enough privileges, as was said earlier.
Make sure that you use some sort of authentication and restrict access to the page to SSL/TLS only, etc. otherwise various kids will be restarting your server all day long.