Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
793 Views

Execute reboot script with haserl

Hi, I am using haserl for cgi programming and want to reboot my uClinux board through pushing a button on a website. So I thought that I can execute the reboot script like that: 

#!/usr/bin/haserl --shell=/bin/hush Content-type: text/html <!-- <% if ; then %> <% /bin/reboot %> <% fi %> --> ... <tr><td colspan="3" class="OptionLabel"><center><input name="Reboot" value="Reboot Now" type="submit"> ...  

 

But nothing seems to happen. 

 

Urmel
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
45 Views

Wild guess:  

Haserl is running as some HTTP user and same has no right to force the reboot. 

 

Of course you should send a web page saying "Booting..." to the browser, when the commant is detected, so you know whether the rebooot command it reached at all.  

 

-Michael
Altera_Forum
Honored Contributor I
45 Views

Thanks Michael, you guessed right. :) 

It was again a problem with the rights of the file. 

So I changed it to root and now it works fine!
Reply