CodeIgniter Forums

Full Version: How can I reboot my remote server ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]RaiNnTeaRs[/eluser]
Hi all, I'm using linux ubuntu , and im trying to shutdown my server using php..
I've tried using bellow command, and it still doesnt work.
Code:
<?
exec('sh shutdown.sh');
?>

this is the cat result of shutdown.sh

Code:
echo mypassword | sudo -S bash
sudo reboot

Thx