0

I installed Monit on my server, as well as the "ProtonMail Bridge".

How to know the path of the "ProtonMail Bridge" service to add it to Monit ?

ubuntu@www-example-com ~ $ ps -ef

enter image description here

Mathieu
  • 45
  • 2
  • 8
  • How exactly did you install it? – Michael Hampton Jul 16 '20 at 19:04
  • @MichaelHampton https://pychao.com/2020/06/10/update-on-using-protonmail-bridge-on-headless-wordpress-linux-servers/ – Mathieu Jul 16 '20 at 19:09
  • That looks like a tutorial on using it. It doesn't tell anything about what you specifically did to install it. – Michael Hampton Jul 16 '20 at 19:11
  • @MichaelHampton I followed the tutorial to install it https://pastebin.com/RZG0VJVT – Mathieu Jul 16 '20 at 19:30
  • Hm. That is quite unusual that they have provided a Debian package but ask you to start it from a shell with nohup. Actually it's bizarre. They should have included a systemd unit so that you could start it as a normal system service. – Michael Hampton Jul 16 '20 at 19:32
  • @MichaelHampton the problem is that ProtonMail does not have a version for servers without a desktop. I'm just trying to monitor if the "Bridge" is still working with Monit. But I don't know what the path to PID is. – Mathieu Jul 16 '20 at 19:44
  • A path and a PID are 2 different things: A path is the location of the program. A PID is a number that the program gets when you start it so that the system can keep track of it. (This number will be different every time) – Garo Jul 17 '20 at 20:36
  • I have updated my question. There are PID files but I can't find the one for "ProtonMail Bridge". – Mathieu Jul 17 '20 at 20:58
  • I would suggest changing the question back to the original and creating a new question for the pid-problem. Otherwise future readers will see a question answered with instructions for something completely different. This would be terribly confusing. – Garo Jul 17 '20 at 21:14

2 Answers2

0
  • which protonmail-bridge will immediately show it it if it's in one of the dirs in your $PATH. (This will probably be the case).
  • If it's not in one of those dirs locate protonmail-bridge will find it fast if your locate-database is up to date (it probably is)
  • If the database is not up to date it will take a bit longer, you can:
    • Bring it up to date with sudo updatedb (recommended)
    • Or search it manually with find . -type f -executable -name 'protonmail-bridge' -print
Garo
  • 181
  • 1
  • 1
  • 6
  • `/usr/bin/protonmail-bridge` here's the output, but how do I find the PID to add it to Monit ? – Mathieu Jul 17 '20 at 17:41
  • That's a completely different question...I never used Monit but I have a feeling that what you are trying to do is wrong. You do know that the PID is different every time it restarts, right ? That being said: The following will show you the PID of the currently running instance: `ps -eo pid,args | grep protonmail-bridge | grep -v grep | perl -pne 's/^\s*(\d+).*/$1/' ` – Garo Jul 17 '20 at 20:32
  • I have updated my question. There are PID files but I can't find the one for "ProtonMail Bridge". – Mathieu Jul 17 '20 at 20:58
0

Since you have installed a deb package, (as per the instructions for installing) type,
dpkg -l protonmail-bridge and press tab to complete the package name. It'll show you all the files and the paths installed by the package.

Krackout
  • 1,575
  • 7
  • 20