MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Auto start MM

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 1.1k Views 1 Watching
    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.
    • J Offline
      johnny_swindle
      last edited by

      I am following the instructions outlined here: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror

      When I paste in the suggested code provided by PM2 an error is returned. I am a total Noob and not sure how to proceed. Here is the error:

      pi@mm1:~/MagicMirror $ sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
      [PM2] Init System found: systemd
      Platform systemd
      Template
      [Unit]
      Description=PM2 process manager
      Documentation=https://pm2.keymetrics.io/
      After=network.target
      
      [Service]
      Type=forking
      User=pi
      LimitNOFILE=infinity
      LimitNPROC=infinity
      LimitCORE=infinity
      Environment=PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
      Environment=PM2_HOME=/home/pi/.pm2
      PIDFile=/home/pi/.pm2/pm2.pid
      
      ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
      ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
      ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill
      
      [Install]
      WantedBy=multi-user.target
      
      Target path
      /etc/systemd/system/pm2-pi.service
      Command list
      [ 'systemctl enable pm2-pi',
        'systemctl start pm2-pi',
        'systemctl daemon-reload',
        'systemctl status pm2-pi' ]
      [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
      [PM2] Making script booting at startup...
      >>> Executing systemctl enable pm2-pi
      [DONE] 
      >>> Executing systemctl start pm2-pi
      Job for pm2-pi.service failed because the control process exited with error code.
      See "systemctl status pm2-pi.service" and "journalctl -xe" for details.
      [ERROR] Exit code : 1
      [PM2][ERROR] systemctl start pm2-pi failed, see error above.
      
      

      Thanks in advance for any and all assistance.

      Johnny

      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 Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy