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

  • How exactly did you install it? – Michael Hampton Jul 16 '20 at 19:04
  • @MichaelHampton pychao.com/2020/06/10/… – 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 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
  • 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
  • /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

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.

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.