Date: 05 Mar 98 08:44:55 +0100 From: leifn@image.dk (Leif Neland) To: freebsd-hackers@FreeBSD.ORG Subject: Doing a reboot from a CGI script? Message-ID: <b0e_9803050852@swimsuit.swimsuit.roskildebc.dk>
next in thread | raw e-mail | index | archive | help
At 05 Mar 98 06:13:05 Peter van Heusden (2:234/49.99) wrote to All regarding Doing a reboot from a CGI script? in area "freebsd-hacker" Pv> I'm busy writing a set of scripts to make the management of a Pv> FreeBSD box easier (basically provide a WWW interface to manage Pv> UUCP, Squid, etc). One of the capabilities I want to build in is Pv> the ability to reboot the machine by pressing a button on a HTML Pv> page. I've tried doing this by running '/sbin/reboot' from the Pv> cgi-bin script (which is written in perl), but all that happens Pv> is that all processes are killed, and the reboot process stops Pv> there. I would imagine that somehow this means that the through Pv> killing the httpd process, the cgi-bin script and thus the Pv> reboot process have died. This seems to happen even if I fork a Pv> process from the cgi-bin script. Pv> Pv> Is there any way to get around this? Has anyone tried this Pv> before? You could signal init instead. kill -KILL 1. I think -KILL is the right signal; see man init. Leif Neland leifn@image.dk --- |Fidonet: Leif Neland 2:234/49 |Internet: leifn@image.dk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b0e_9803050852>