CodeIgniter Forums
How can I reboot my remote server ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How can I reboot my remote server ? (/showthread.php?tid=13583)



How can I reboot my remote server ? - El Forum - 11-28-2008

[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