Jump to content

Automatic boot after mains power on


NickS

Recommended Posts

My NAS do very little overnight so my NAS4 shuts down in the evening and shortly afterwards a physical time switch cuts the power - reinstating power in the morning at which time the NAS4 automatically reboots.

I want to do the same with the NAS64 - but even though I've read this (https://wiki.kobol.io/helios64/auto_poweron/) I'm not sure how to go about it.

 

I can't understand if it only works if the UPS has died, or if I have to run a script before shutdown or both.

 

Could you please clarify?

 

Thx ... Nick

Link to comment
Share on other sites

OK Thanks ebin-dev

 

For others who are as dumb as me you need to edit  "/lib/systemd/system-shutdown/disable_auto_poweron"

and change line ...

"echo 0 > /sys/class/gpio/gpio153/value"

to

"echo 1 > /sys/class/gpio/gpio153/value"

 

and it works!!! 

Link to comment
Share on other sites

Hi gprovost,

Yes I happened to find RTC in the doc yesterday!

 

I'm still using auto power on in case of power failure.

 

But, as you kindly suggest, I'm now using RTC - 2 tasks in OpenMediaVault5 job scheduling...

1/  sudo rtcwake -m disable                                                           (each reboot to reset any outstanding wake timers)

2/  sudo rtcwake -m off --date '+ 6 hour 15 minutes 0 seconds'    (each morning at 01:00 to shutdown and set wake timer for 07:15)

 

It worked fine this morning!  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines