Though at the risk of the dreaded featuritis, why not extend this little script to operate in 'suid' mode (with taint checking, of course) so that regular users can do stuff without 'sudo' or 'su' such as restart the Apache server or DNS?

A little 'chmod +s', checking of $< and it might be that exponentially more useful. Of course, 'suid' mode could be an option, such that it doesn't explicitly have to be suid, but if it were, you can be even more lazy.

In reply to Re: Service controller for Linux/Unix by tadman
in thread Service controller for Linux/Unix by jjhorner

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":