aboutsummaryrefslogtreecommitdiff
path: root/net/activemq/files
diff options
context:
space:
mode:
authorTom Judge <tj@FreeBSD.org>2014-02-21 20:05:35 +0000
committerTom Judge <tj@FreeBSD.org>2014-02-21 20:05:35 +0000
commit834893aeabe57838f0402b2afebe23698675c95b (patch)
tree442044287496f5993ae417f5064fc4572aa349b7 /net/activemq/files
parentf27f0fe550cda83300cd15bc93c0ed45488acc55 (diff)
downloadports-834893aeabe57838f0402b2afebe23698675c95b.tar.gz
ports-834893aeabe57838f0402b2afebe23698675c95b.zip
Notes
Diffstat (limited to 'net/activemq/files')
-rw-r--r--net/activemq/files/activemq.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/activemq/files/activemq.in b/net/activemq/files/activemq.in
index f7ef1a354e76..0bca4a2ca59b 100644
--- a/net/activemq/files/activemq.in
+++ b/net/activemq/files/activemq.in
@@ -40,9 +40,12 @@ load_rc_config $name
: ${activemq_classpath:=%%ETCDIR%%}
: ${activemq_conf:=%%ETCDIR%%}
: ${activemq_data:=%%MQDB%%}
+: ${activemq_logs:=/var/log/activemq}
: ${activemq_home:=%%DATADIR%%}
: ${activemq_javargs:='-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote'}
: ${activemq_stop_timeout:="10"}
+: ${activemq_hostname:=`/bin/hostname`}
+
pidfile=/var/run/${name}.pid
@@ -52,8 +55,10 @@ java_options=" -server -jar ${activemq_javargs} \
-Dactivemq.classpath=${activemq_classpath} \
-Dactivemq.conf=${activemq_conf} \
-Dactivemq.data=${activemq_data} \
+ -Dactivemq.logs=${activemq_logs} \
-Dactivemq.home=${activemq_home} \
- -Dactivemq.base=${activemq_home}"
+ -Dactivemq.base=${activemq_home} \
+ -Dactivemq.hostname=${activemq_hostname}"
java_command="%%LOCALBASE%%/bin/java ${java_options} ${jar_file}"
@@ -66,6 +71,12 @@ stop_cmd="activemq_stop"
activemq_precmd() {
touch ${pidfile}
chown ${activemq_user}:${activemq_group} ${pidfile}
+ if [ ! -d ${activemq_logs} ]; then
+ /usr/bin/install -d -o ${activemq_user} -g ${activemq_group} ${activemq_logs}
+ fi
+ if [ ! -d ${activemq_data} ]; then
+ /usr/bin/install -d -o ${activemq_user} -g ${activemq_group} ${activemq_data}
+ fi
}
activemq_stop() {