MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Custom autostart pm2 script, fixsandbox script doesn't work

    Troubleshooting
    2
    4
    201
    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
      TimOgden last edited by

      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 Reply Quote 0
      • S
        sdetweil @TimOgden last edited by sdetweil

        @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

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • S
          sdetweil @TimOgden last edited by

          @timogden did u get this working?

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • S
            sdetweil @TimOgden last edited by

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

            Sam

            Create a working config
            How to add modules

            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