Skip to content

Commit

Permalink
Merge branch 'release-19.0.0' of github.com:OpenNMS/opennms into rele…
Browse files Browse the repository at this point in the history
…ase-19.0.0
  • Loading branch information
agalue committed Nov 30, 2016
2 parents 00ebfc7 + c5b6a7d commit 3bccf53
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions opennms-assemblies/minion/src/main/filtered/etc/minion.init
Expand Up @@ -82,10 +82,6 @@ JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
# export any default configurable variables from sysconf
export JAVA_HOME JAVA_MIN_MEM JAVA_MAX_MEM MAX_FD JAVA JAVA_DEBUG_OPTS JAVA_DEBUG_PORT JAVA_OPTS CLASSPATH KARAF_DEBUG LD_LIBRARY_PATH

is_running() {
"$MINION_HOME"/bin/status >/dev/null 2>&1
}

get_root_pid() {
ROOT_INSTANCE_PID=0
if [ -f "${MINION_HOME}/instances/instance.properties" ];
Expand All @@ -95,6 +91,15 @@ get_root_pid() {
echo "$ROOT_INSTANCE_PID"
}

is_running() {
PID=$(get_root_pid)
if [ "${PID}" -ne "0" ] && ps p "$PID" > /dev/null; then
return 0
else
return 1
fi
}

stop_minion() {
"$MINION_HOME"/bin/stop >/dev/null
}
Expand Down

0 comments on commit 3bccf53

Please sign in to comment.