mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
77b6878ec6
Finding the pid of background linux/java processes has been difficult to do from java, so a bash script is provided to simplify the task.
16 lines
408 B
Bash
Executable File
16 lines
408 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Find the pid of the java process by grepping for the mainClassName and appName,
|
|
# then print the 2nd column of the output to stdout.
|
|
#
|
|
# Doing this from Java is problematic, probably due to limitation of the
|
|
# apitest.linux.BashCommand implementation.
|
|
|
|
|
|
MAIN_CLASS_NAME=$1
|
|
APP_NAME=$2
|
|
|
|
# TODO args validation
|
|
|
|
ps aux | grep java | grep ${MAIN_CLASS_NAME} | grep ${APP_NAME} | awk '{print $2}'
|