$OpenBSD: patch-bin_activemq,v 1.4 2013/03/18 14:46:28 ajacoutot Exp $
--- bin/activemq.orig	Wed Feb  6 17:53:14 2013
+++ bin/activemq	Wed Mar 13 16:03:24 2013
@@ -29,7 +29,7 @@
 
 # ------------------------------------------------------------------------
 # CONFIGURATION
-ACTIVEMQ_CONFIGS="/etc/default/activemq $HOME/.activemqrc"
+ACTIVEMQ_CONFIGS="${SYSCONFDIR}/activemq.conf $HOME/.activemqrc"
 
 # Backup invocation parameters
 COMMANDLINE_ARGS="$@"
@@ -37,7 +37,7 @@ COMMANDLINE_ARGS="$@"
 # For using instances
 if ( basename $0 | grep "activemq-instance-" > /dev/null);then
    INST="`basename $0|sed 's/^activemq-instance-//;s/\.sh$//'`"
-   ACTIVEMQ_CONFIGS="/etc/default/activemq-instance-${INST} $HOME/.activemqrc-instance-${INST}"
+   ACTIVEMQ_CONFIGS="${SYSCONFDIR}/activemq-instance-${INST}.conf $HOME/.activemqrc-instance-${INST}"
    echo "INFO: Using alternative activemq configuration files: $ACTIVEMQ_CONFIGS"
 fi
 
@@ -593,7 +593,6 @@ invoke_stop(){
          echo
          echo "INFO: Regular shutdown not successful,  sending SIGKILL to process with pid '$PID'"
          kill -KILL $PID
-         RET="1"
        fi
     elif [ -f "$ACTIVEMQ_PIDFILE" ];then
        echo "ERROR: No or outdated process id in '$ACTIVEMQ_PIDFILE'"
@@ -651,10 +650,10 @@ Tasks provided by the sysv init script:
                       (see next usage section)
 
 Configuration of this script:
-    The configuration of this script can be placed on /etc/default/activemq or $HOME/.activemqrc.
+    The configuration of this script can be placed on ${SYSCONFDIR}/activemq.conf or $HOME/.activemqrc.
     To use additional configurations for running multiple instances on the same operating system
     rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
-    This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
+    This changes the configuration location to ${SYSCONFDIR}/activemq-instance-<INSTANCENAME>.conf and
     \$HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence.
 EOF
   exit $RET
