Author Topic: Command line shutdown/power off  (Read 4654 times)

EddieA

  • Zen Monk
  • **
  • Posts: 70
  • Karma: +3/-0
    • View Profile
Command line shutdown/power off
« on: September 25, 2012, 12:18:20 am »
I'm looking at configuring a UPS to shut down my system should it transfer to a UPS.

Is "poweroff" sufficient, or is there a script which will do a controlled shutdown of services prior to a power down.

I should add that this is currently 2.2, but will be moving to 3.0 at some point.

Cheers.
« Last Edit: September 25, 2012, 12:22:23 am by EddieA »

browley

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Re: Command line shutdown/power off
« Reply #1 on: September 25, 2012, 06:53:36 pm »
Try the shutdown command:

Code: [Select]
sudo shutdown -h now
You can also give it a time by giving it a time in minutes instead of now above.  This should bring down all the services "nicely".  Good luck!

tanseeq

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Command line shutdown/power off
« Reply #2 on: January 20, 2021, 01:08:07 pm »
sudo shutdown -h now

is this correct command to properly shutdown zentyal 5.0 machine?

BerT666

  • Zen Warrior
  • ***
  • Posts: 228
  • Karma: +17/-0
    • View Profile
Re: Command line shutdown/power off
« Reply #3 on: January 21, 2021, 09:12:52 am »
Hi,

most UPS'es I know have something like a client to do a clean shutdown when the primary powersource fails.
e.g. APC uses "PowerChute"...

Best Bert

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Command line shutdown/power off
« Reply #4 on: January 22, 2021, 11:46:03 am »
 :)

Did you think about UPower?

https://upower.freedesktop.org/docs/UPower.html

Cheers!

- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,