Read the statement by Michael Teeuw here.
Custom autostart pm2 script, fixsandbox script doesn't work
-
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!
-
@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 -
@timogden did u get this working?
-
@timogden the sandbox error is false reporting from electron, nothing we can do about it