You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2019/10/25 21:26:08 UTC

[accumulo] branch 2.0 updated: Allow overriding of directory for pid files (#1393)

This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.0 by this push:
     new f2f1455  Allow overriding of directory for pid files (#1393)
f2f1455 is described below

commit f2f1455ae7a376b9ecc364eb79e8cc8b9dc847bf
Author: etseidl <et...@users.noreply.github.com>
AuthorDate: Fri Oct 25 14:18:21 2019 -0700

    Allow overriding of directory for pid files (#1393)
---
 assemble/bin/accumulo-service | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/assemble/bin/accumulo-service b/assemble/bin/accumulo-service
index 0c6f0d2..34b52fb 100755
--- a/assemble/bin/accumulo-service
+++ b/assemble/bin/accumulo-service
@@ -124,16 +124,17 @@ function main() {
     source "${conf}/accumulo-env.sh"
   fi
   ACCUMULO_LOG_DIR="${ACCUMULO_LOG_DIR:-${basedir}/logs}"
+  ACCUMULO_PID_DIR="${ACCUMULO_PID_DIR:-${basedir}/run}"
 
   mkdir -p "$ACCUMULO_LOG_DIR" 2>/dev/null
-  mkdir -p "${basedir}/run" 2>/dev/null
+  mkdir -p "$ACCUMULO_PID_DIR" 2>/dev/null
 
   host="$(hostname)"
   if [[ -z "$host" ]]; then
     host=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1  -d'/')
   fi 
   service="$1"
-  pid_file="${basedir}/run/accumulo-${service}.pid"
+  pid_file="${ACCUMULO_PID_DIR}/accumulo-${service}.pid"
   case "$service" in
     gc|master|monitor|tserver|tracer)
       if [[ -z $2 ]]; then