-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_nailgun_server
More file actions
executable file
·16 lines (16 loc) · 1.01 KB
/
run_nailgun_server
File metadata and controls
executable file
·16 lines (16 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -o pipefail
set -e
tmp_dir=$(mktemp -d /tmp/Nailgun_server_PID.XXXXXX)
trap 'rm -Rf "$tmp_dir"' EXIT INT TERM HUP
tmp_pipe=${tmp_dir}/pid
mkfifo -m 600 "${tmp_pipe}"
port=
if [ ! -z $1 ]; then port=:"$1"; fi
(java -Djavax.net.ssl.trustStore=mutinack_public_trustStore -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStore=mutinack_public_selfsigned.jks -Djavax.net.ssl.keyStorePassword=passphrase -cp mutinack.jar:nailgun/nailgun-server/target/nailgun-server-0.9.2-SNAPSHOT-jar-with-dependencies.jar:datanucleus-core-5.0.7-SNAPSHOT.jar:datanucleus-rdbms-5.0.6-SNAPSHOT.jar:datanucleus-api-jdo-5.0.6-SNAPSHOT.jar:javax.jdo-3.2.0-m7-SNAPSHOT.jar:javax.persistence-2.2.0-m2-SNAPSHOT.jar:jdo-api-3.1.jar:postgresql-9.4.1212.jar com.martiansoftware.nailgun.NGServer --writePID ${tmp_pipe} 127.0.0.1${port} > run_nailgun_server_out_err 2>&1 || true; (echo FAILED > ${tmp_pipe}) 2> /dev/null) > /dev/null 2> /dev/null &
result=`cat "${tmp_pipe}"`
if [ "${result}" = "FAILED" ];
then
exit 1
fi
echo ${result}