Results 1 to 5 of 5
  1. #1
    Untangler
    Join Date
    Oct 2017
    Posts
    39

    Default Untangle Shutdown

    I want to write a short program that will be run from a Windows 10 PC when the UPS that the PC and my Untangle system are connected to reaches a critical battery level.

    I can get the program to connect to Untangle via SSH but I need to confirm the correct command to initiate a graceful shutdown. Is it simply:-

    shutdown -h now

    or is there something more to it?

    Will this result in the Untangle box being powered off?

    Thanks
    Mike

  2. #2
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    26,174

    Default

    I prefer shutdown -hP now, but your command works too.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  3. #3
    Untangler
    Join Date
    Oct 2017
    Posts
    39

    Default

    Quote Originally Posted by sky-knight View Post
    I prefer shutdown -hP now, but your command works too.
    Thanks sky-night. Can you please tell me what the difference is between the two?

    I'm I correct in assuming that the Untangle database will be in a consistent state with shutting down from the terminal interface?

    Mike

  4. #4
    Untangle Ninja Jim.Alles's Avatar
    Join Date
    Jul 2008
    Location
    Central PA
    Posts
    2,605

    Default

    Quote Originally Posted by mikel View Post
    Can you please tell me what the difference is between the two?
    https://manpages.debian.org/buster/systemd-sysv/shutdown.8.en.html
    If you think I got Grumpy

  5. #5
    Master Untangler
    Join Date
    Oct 2013
    Posts
    260

    Default

    I use Plink.

    I have the following command in a .bat file to shutdown Untangle from a Windows PC through APC's PowerChute Network Shutdown (PCNS) in an event of an extended power failure.

    I have a similar command to shutdown my XPEnology NAS.

    echo n | "C:\Program Files\PuTTY\plink.exe" -ssh -pw <password> root@<ip_address> poweroff
    Just replace the password and IP address with your own and remove the "<>" brackets, assuming that the login name is "root".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2