service.upstart.deb.brooklyn.conf Maven / Gradle / Ivy
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
description "Apache Brooklyn upstart script"
author "Aleksandr Vasilev [email protected]"
start on started networking
stop on runlevel [016]
respawn
respawn limit 5 10
umask 0066
setuid brooklyn
setgid brooklyn
console log
pre-start script
logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
end script
script
EXTRA_JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -XX:SoftRefLRUPolicyMSPerMB=1 -Xms256m -Xmx2g"
KARAF_HOME="/opt/brooklyn/"
KARAF_ETC="/etc/brooklyn/"
KARAF_REDIRECT=/dev/null
BROOKLYN_PERSISTENCE_DIR="/var/lib/brooklyn"
export EXTRA_JAVA_OPTS KARAF_REDIRECT KARAF_HOME KARAF_ETC BROOKLYN_PERSISTENCE_DIR
exec /opt/brooklyn/bin/karaf server >> "$KARAF_REDIRECT" 2>&1
end script
pre-stop script
logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
end script
© 2015 - 2025 Weber Informatics LLC | Privacy Policy