How to make Webmin "halt" do...

Webmin
2012-06-14
2013-10-29
  • LupusAnthropos
    LupusAnthropos
    2012-06-14

    For shutdown, Webmin uses "halt" (apparently with no parameters), so my Ubuntu 12.04 (Precise Pangolin) system just halts and sits there without actually powering off.

    When logged in at the system console, I can use "shutdown -h now" or "shutdown -P now" and the system will power down, but Webmin just uses a plain "halt" and does not power down the system.

    I plan to install this system as a headless intranet webserver in an environment where nobody will even be touching the machine - just performing their internal record keeping via their browsers.  They are NOT technically knowledgeable people (and are not looking to be such), so I plan to give them a Webmin user whose only enabled capability will be to shut down the system when they leave the office.

    How may I change Webmin to power down the system properly?

    Thank you.

     
  • LupusAnthropos
    LupusAnthropos
    2012-06-16

    Found it!

    Since nobody offered any assistance, I hunted around for the location of the Webmin files then did a recursive grep to look for files containing the word "halt."

    When I found it, I changed /etc/webmin/config to replace "halt" with "shutdown -P now" instead.

    Works fine and DOES power down the system properly.

     
    • fade2gray
      fade2gray
      2013-07-21

      Thanks Lupus, I also found this a problem after upgrading Webmin, but I could not find the relevant config file in /etc/webmin/, though I did find it in /etc/webmin/init/.

      Also, changing "shutdown_command=halt" to "shutdown_command=poweroff" works the same as "shutdown_command=shutdown -P now" - just fewer keystrokes when editing. ;-)

       
      Last edit: fade2gray 2013-07-21
  • Fred Grayson
    Fred Grayson
    2012-06-20

    You could have created a Custom Command to do this.

     
  • ....
    ....
    2012-10-28

    a tad bit late but you have my gratitude lupusanthopos

     
  • gandolf
    gandolf
    2013-10-29

    shouldnt change on an update but check it anyway