Combine autoshutdown and rtcwake

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Combine autoshutdown and rtcwake

      I finally managed to autoshutdown my NAS (OMV 4.1.9) once all PCs and Laptops no longer are in use. I do this by using the OMV-plugin and make it monitor the respective IP-Adresses. If the PCs are all shut down, the NAS will autoshutdown short time afterwards.

      What I have not succeeded in yet, was to wake up my NAS at a certain time in the morning (say 7 am). I have read plenty of websites on rtcwake and I have learned that rtcwake can only wake the NAS up once at one point in the future but it has no built-in regular alarm function (such as: every morning at 7 am). So I guess there are two options:

      - either run rtcwake automatically (telling the NAS to wake up at 7am) just before autoshutdown suspends the NAS (how would I do this?)
      - or: run a cron job that does this automatically. Cron jobs do not run out of suspended mode, so the cron job should be executed when the NAS is awake.

      I have, however, not succeeded in achieving the above. I'll spare you the details. It's probably that I am neither an expert in scripting nor in cron jobs, I'd say my skills are rather very limited. I've spent much time trying to find a solution, but to no avail.
      Anyone with a walkthrough how to achieve the above ?

    • You can run this command as scheduled job during boot:
      rtcwake -m no -l -t $(date +%s -d ‘tomorrow 07:00’)

      Check this thread:
      [Guide] RTCwake to turn off/on your nas at a specific time
      Odroid HC2 - armbian - Seagate ST4000DM004 - OMV4.x
      Asrock Q1900DC-ITX - 16GB - 2x Seagate ST3000VN000 - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!: