This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Request: Support for UPS

Hello!

I wonder why nobody has requested this before, but I think it would be nice to have support for an Uninterruptible Power Supply in ASL. There are a few GPL solutions for this and it wouldn't be difficult to implement them into ASL. We do have an APC SmartUPS connected to our Astaro-Machine.


This thread was automatically locked due to age.
Parents
  • Here is a crude way if you really want your ASL to shut down.
    You must have a windows machine hooked up to the same UPS. It must be running the UPS Software.

    Enable ssh if you haven't already on your ASL. Also Make sure only internal network can access.

    Download Plink (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)

    Put it in my c:\winnt dir (because it's in my "path")

    Created a batch file "shutdownfw.bat" with this in it:

    plink -ssh 192.168.0.254 -P 22 -l yourusername -pw usernamepassword shutdown -h +1

    -ssh: to use a ssh connection
    192.168.0.254: obviously the fw's IP (or whatever you want to shutdown)
    -P 22: port 22 
    -l yourusername: the user you want to log on as, I use root (not adviceable)
    -pw usernamepassword: the password of the user
    shutdown -h +1: the command you want to do, in my case shutdown (halt) in one minute (+1)

    Next I went into PowerChute PLUS (my UPS management software) under Configuration>Event Actions:

    "UPS on battery": marked "Run command file", went into options, made sure to select to begin shutdown in 0 seconds...
    I did the same for some other conditions....

    Next I created another batchfile, this time named abortshutdownfw.bat

    It differs only in that the command to execute is "shutdown -c" (cancel shutdown)
    And then I added that to powerchute under "Utility Power Restored" and some others...

    Hope this helps

    Remeber that the username and password are stored in clear text in the batch file. Anybody that infultrates your windows machine may potentially find it and exploit it!

    This is just a crude way of getting the ASL to shutdown. 

    Hope this helps.
Reply
  • Here is a crude way if you really want your ASL to shut down.
    You must have a windows machine hooked up to the same UPS. It must be running the UPS Software.

    Enable ssh if you haven't already on your ASL. Also Make sure only internal network can access.

    Download Plink (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)

    Put it in my c:\winnt dir (because it's in my "path")

    Created a batch file "shutdownfw.bat" with this in it:

    plink -ssh 192.168.0.254 -P 22 -l yourusername -pw usernamepassword shutdown -h +1

    -ssh: to use a ssh connection
    192.168.0.254: obviously the fw's IP (or whatever you want to shutdown)
    -P 22: port 22 
    -l yourusername: the user you want to log on as, I use root (not adviceable)
    -pw usernamepassword: the password of the user
    shutdown -h +1: the command you want to do, in my case shutdown (halt) in one minute (+1)

    Next I went into PowerChute PLUS (my UPS management software) under Configuration>Event Actions:

    "UPS on battery": marked "Run command file", went into options, made sure to select to begin shutdown in 0 seconds...
    I did the same for some other conditions....

    Next I created another batchfile, this time named abortshutdownfw.bat

    It differs only in that the command to execute is "shutdown -c" (cancel shutdown)
    And then I added that to powerchute under "Utility Power Restored" and some others...

    Hope this helps

    Remeber that the username and password are stored in clear text in the batch file. Anybody that infultrates your windows machine may potentially find it and exploit it!

    This is just a crude way of getting the ASL to shutdown. 

    Hope this helps.
Children
No Data