PID for jitsi-videobridge? + background?


#1

Hello,

How can I specify that the pid file should be /var/run/jitsi-videobridge.pid when I start this command ?

export JVB_HOME=/usr/local/jitsi-videobridge
mvn compile exec:exec -Dexec.executable=java -Dexec.args="-cp %classpath org.jitsi.videobridge.Main –domain=“jitsi.mydomain.org” --host=“jitsi.mydomain.org” --port=“5347” --secret=“YOURSECRET1” -Djava.library.path=$JVB_HOME/lib/native/linux-64 -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge"

I’m trying to write a startup script for Openbsd

And also how can I daemonize this program/command ?

Thank you


Compile for Openbsd
#2

Hum, why are you trying to run from source and daemonize when running from source? You should do that from a binary distribution.

Create an assembly of jitsi-videobridge and use the shellscript that is already available to run it.
mvn -U install -DskipTests -Dassembly.skipAssembly=false
I suppose you can use the resuling archive of target/jitsi-videobridge-linux-x64-1.1-SNAPSHOT.zip.

The shell script does not create a pid file now, but I’m planning to add that in the following weeks, cause I need it for the systemd changes I’m working on.


#3

I’m not sure I understood everything you wrote

why are you trying to run from source and daemonize when running from source? You should do that from a binary distribution

But the sheel scripts are written for linux, I looked at some shell scripts and tried to adapt them

use the shellscript that is already available to run it

Of course, I’m willing to take the best advice from you

What would the -U install option do, so far I used

mvn package -DskipTests -Dassembly.skipAssembly=false

Also I dont understand what’s missing to get the PID from the mvn compile command ?


#4

I thought the Linux scripts will work.

The -U is to update the maven packages.

In bash, you can do $! which will return the last command pid, this way you can get it in Linux.

My point was, that you are using the sources to run a service, I wanted to point that there are assemblies we produce for the known operating systems, which are binary archives you can use on different operating systems.
I was thinking that you can reuse the Linux one, but apparently, I’m wrong as I’m not familiar with OpenBSD at all.
So another option is to contribute script and assemblies for OpenBSD so you can build binary archives for OpenBSD, and check how Linux one is built and where files are put so you can do a similar thing for OpenBSD. This is just a proposal that you can ignore.