@axel - Now that you can run your script and have it execute the command (I’m assuming that when you run the script, it does what you want) you just have to tell pm2 to manage that script.
Tell pm2 to manage the script: pm2 start startcam.sh
Tell pm2 to remember & autostart the script: pm2 save
Let us know how it goes.