in reply to Re: Simple reboot from perl?
in thread Simple reboot from perl?

Unlike other IO commands, system returns 0 on sucess, making the system() or die ... construct rather useless.

the documentation elaborates quite a bit on the correct way to check for errors. Read it (both of you :-).

Also I'd never, ever consider running the web server as root, not even for testing. A much saner approach would be to add a sudo rule that allows the www or www-data user to execute just that one command. But the whole idea seems flawed to me. Remote management systems exist.

Replies are listed 'Best First'.
Re^3: Simple reboot from perl?
by johnny_carlos (Scribe) on Nov 04, 2011 at 16:19 UTC
    ++'d. Yes that was rather silly of me, wasn't it? 'Tis better to go with what's in the moritz documentation link.