From d9f3e9e2e73ba1f2b1b1a5ad117928893ad90104 Mon Sep 17 00:00:00 2001 From: kytv <kytv@mail.i2p> Date: Sat, 28 Jan 2012 22:08:39 +0000 Subject: [PATCH] try to parse the pidfile location from wrapper.config --- installer/resources/i2prouter | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index 197483e62c..61f48dc699 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -298,7 +298,11 @@ ANCHORFILE="$PIDDIR/$APP_NAME.anchor" COMMANDFILE="$PIDDIR/$APP_NAME.command" STATUSFILE="$PIDDIR/$APP_NAME.status" JAVASTATUSFILE="$PIDDIR/$APP_NAME.java.status" -PIDFILE="$PIDDIR/$APP_NAME.pid" +if [ $(which awk) ]; then + PIDFILE="$(awk -F'=' '/^ *wrapper\.pidfile/{print $2}' "$WRAPPER_CONF")" +else + PIDFILE="$PIDDIR/$APP_NAME.pid" +fi LOCKDIR="/var/lock/subsys" LOCKFILE="$LOCKDIR/$APP_NAME" pid="" -- GitLab