Derby linux init.d 실행 스크립트#

#
# Startup script for Derby
#
# chkconfig: - 20 50
# description: Start Derby
#
# processname: derbyt
#
# Source function library.
. /etc/rc.d/init.d/functions

export JAVA_HOME=/usr/local/jdk1.6.0_01
export DERBY_HOME=/usr/local/derby
export PATH=$PATH:$JAVA_HOME/bin:$DERBY_HOME/bin

HOST_IP=0.0.0.0

# See how we were called.
case "$1" in
        start)
                echo -n "Starting Derby "
                mkdir -p $DERBY_HOME/data
                cd $DERBY_HOME/data
                exec java -jar $DERBY_HOME/lib/derbynet.jar -h $HOST_IP start &
                touch /var/lock/subsys/derby
                echo
                ;;
        stop)
                echo -n "Shutting down Derby "
                exec java -jar $DERBY_HOME/lib/derbynet.jar -h $HOST_IP shutdown &
                rm -rf /var/lock/subsys/derby
                echo
                ;;
#        restart)
#                $0 stop
#                sleep 10
#                $0 start
#                ;;
        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
esac

exit 0

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 17-5월-2021 01:15 by UnknownAuthor