2

I do this to make my scripts run on Raspbian start:

sudo pm2 startup ubuntu
sudo pm2 start my_script.js
sudo pm2 start another_script.js

Yet, RPi starts without them, what can be wrong?

0

Setup pm2 for Raspberry:

sudo env PATH=$PATH:/usr/local/bin pm2 startup systemd -u pi --hp /home/pi

Add your script:

pm2 start my_script.js

Save pm2 table for reboot:

sudo pm2 save

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.