Bruce Nik wrote:
Should the following file (if run from IE) reboo the system:
/var/www/cgi-bin/reboot
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Bash as CGI"
echo "</title></head><body>"
echo "<h1>Rebooting now $(shutdown -r now)</h1>"
echo "</body></html>"
Trying to find a way to restart a remote server that only gives scp access and apache is running too.
Not unless the service that will be executing the script, Apache in this
case, has super user access, and it probably (shouldn't, and I hope for
you sake) doesn't. There are ways around this but this seems like a bad
way to go. You have SCP but not SSH access?
A system command from a call to Asterisk seems like a good way to go,
and is on topic for this list :)
--
Cliff Flood
Systems Administrator
Jazinga Inc.
+1 416 548 4755 x106
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]