MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    UNSOLVED MM Starts before network is up

    Troubleshooting
    2
    2
    608
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      savona last edited by

      I am using pm2 and it’s startup scripts to start MM on boot on my pi 3. I tried several different ordering techniques including:

      [Unit]
      Description=PM2 process manager
      Documentation=https://pm2.keymetrics.io/
      Wants=network-online.target
      After=network.target network-online.target
      ....
      [Install]
      WantedBy=multi-user.target network-online.target
      

      For some reason nothing works and I keep getting auth errors on my modules and a constant Loading text in my calendar.

      I resorted to writing this in my MM startup script to wait for a ping:

      ((count = 100))
      while [[ $count -ne 0 ]] ; do
          ping -c 1 8.8.8.8
          rc=$?
          if [[ $rc -eq 0 ]] ; then
              ((count = 1))
          fi
          ((count = count - 1))
      done
      
      if [[ $rc -eq 0 ]] ; then
      	cd ~/MagicMirror
      	DISPLAY=:0 npm start
      fi
      

      Anyone else have any ideas?

      1 Reply Last reply Reply Quote 0
      • D
        dazza120 last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy