099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Startup script for Apache Derby
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Software License Agreement (BSD License)
d47b7213b7d5cd8f5fc70757b746342924488cf8Trond Norbye# Copyright (c) 2011, Trond Norbye
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# All rights reserved.
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Redistribution and use in source and binary forms, with or without
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# modification, are permitted provided that the following conditions are
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# * Redistributions of source code must retain the above copyright
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# notice, this list of conditions and the following disclaimer.
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# * Redistributions in binary form must reproduce the above
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# copyright notice, this list of conditions and the following disclaimer
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# in the documentation and/or other materials provided with the
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# distribution.
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# * The names of the contributors may be used to endorse or promote
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# products derived from this software without specific prior written
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# permission.
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye### BEGIN INIT INFO
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Provides: derby
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Required-Start: $network $local_fs
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Required-Stop: $network $local_fs
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Default-Start: 2 3 4 5
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Default-Stop: 0 1 6
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Short-Description: start Apache Derby
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye### END INIT INFO
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# You may install the links by installing the file in /etc/init.d and
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# update-rc.d derby default
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye# Reads config file (will override defaults above)
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye[ -r /etc/default/derby ] && . /etc/default/derby
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye # exit unless we've got the jar file
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye start-stop-daemon --stop --quiet --pidfile $PIDFILE
099386ae66a95e7edfed3088abb82bc1e78b6e7cTrond Norbye status_of_proc -p $PIDFILE /usr/bin/java Derby > /dev/null 2>&1
d47b7213b7d5cd8f5fc70757b746342924488cf8Trond Norbye echo "Usage: /etc/init.d/derby {start|stop|restart|try-restart|reload|force-reload|status}"