PM2 - add custom code?

we have a CRM integration built that runs on our freepbx server via node init.js
however, i want to make this persistent… this Should be as simple as using pm2 start init.js --name='FooBar'
but for some reason, I cant get the syntax.
i know that I can use fwconsole pm2 list, and get output.
how do I add my own script into the Freepbx PM2 / processmanagement?

Well, to be honest, the pm2 library was never meant to be accessed outside of the FreePBX framework, so your best bet would be to go with creating a custom FreePBX module.

Of course, creating custom FreePBX modules may come with its own nightmare of having to sign them.

Other than that, accessing the /var/www/html/admin/modules/pm2/node/node_modules/pm2/bin/pm2 command as the asterisk user is also an option.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.