• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Custom autostart pm2 script, fixsandbox script doesn't work

Scheduled Pinned Locked Moved Unsolved Troubleshooting
4 Posts 2 Posters 544 Views 2 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.
  • T Offline
    TimOgden
    last edited by Feb 24, 2022, 5:54 PM

    Re: PM2 autostart not working

    About a month ago, I wrote a custom start up script that I called copy_values.sh which replaces a bunch of placeholder strings with their respective values in the config file before running npm start. You can find the thread where I made that solution here.

    Now, I’m trying to get the pm2 autostart to work. Everything is set up exactly how the docs suggest it, but like the thread I am replying to, I get the error about how I can’t run electron as a root without the --no-sandbox tag. I ran @sdetweil 's fixsandbox script, and it does indeed log ‘fixing sandbox permissions’, but then when I run the script again with ‘pm2 start copy_values’, nothing starts, and if I look at the pm2 logs, I see the same issue about the no-sandbox tag.

    Is it because I have a custom installer? I’ve looked at Sam’s script, and it doesn’t seem relative to the mm.sh script that the docs provide, so this should work, but I have no idea why nothing changes. I must be missing something small. Thanks!

    S 3 Replies Last reply Feb 24, 2022, 8:37 PM Reply Quote 0
    • S Offline
      sdetweil @TimOgden
      last edited by sdetweil Feb 24, 2022, 8:37 PM Feb 24, 2022, 8:37 PM

      @timogden u don’t want copy_values to be run separately.

      u want to call it from installers/mm.sh before it does npm start.

      I don’t know about the sandbox error unless at some time you did sudo pm2 start

      pm2 info xx
      where xx is the number shown in
      pm2 status

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @TimOgden
        last edited by Mar 8, 2022, 11:12 AM

        @timogden did u get this working?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @TimOgden
          last edited by Mar 15, 2022, 6:53 PM

          @timogden the sandbox error is false reporting from electron, nothing we can do about it

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          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