pm2-gui
pm2-gui copied to clipboard
Need to pass fully qualified path to pm2-gui.ini
Loving the monitor. Thanks for implementing it. Our problem is that we need to specify a fully qualfiied path to the pm2-gui.ini. A relative path does not work.
eg-
pm2-gui start my-pm2-gui.ini
Ignores the ini file and uses the global defaults instead.
I have to do this:
pm2-gui start /etc/var/my-app/other-stuff/my-pm2-gui.ini
Indeed :)
I think I see the problem. It is here:
https://github.com/Tjatse/pm2-gui/blob/master/lib/daemon.js#L23
You are resolving the confFile
relative to the path of the installation folder of pm2-gui (typically somewhere in the global npm folder), rather than the location where the process was run from.
You probably want to use process.cwd()
instead of __dirname
.
Created https://github.com/Tjatse/pm2-gui/pull/39. The change is simple, but it means that all paths default to the cwd instead of the installation directory. I believe this is more intuitive and is the behavior I would like to see.