amsfo revision 0a99555401a033704f1f171baab6db11fb5528f2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
#
# The contents of this file are subject to the terms
# of the Common Development and Distribution License
# (the License). You may not use this file except in
# compliance with the License.
#
# You can obtain a copy of the License at
# See the License for the specific language governing
# permission and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# Header Notice in each file and include the License file
# at opensso/legal/CDDLv1.0.txt.
# If applicable, add the following below the CDDL Header,
# with the fields enclosed by brackets [] replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# $Id: amsfo,v 1.6 2009/04/16 15:35:58 subashvarma Exp $
#
#
# Portions Copyrighted 2011 ForgeRock AS
### To Debug this script set AMDEBUG to true ####
AMDEBUG=false
if [ "$OS_ARCH" = "Linux" ]; then
elif [ "$OS_ARCH" = "HP-UX" ]; then
fi
##### sourceing amsfo config file ####
if [ "$OS_ARCH" = "Linux" ]; then
elif [ "$OS_ARCH" = "HP-UX" ]; then
fi
#####hpux-dev#####
if [ "$OS_ARCH" = "Linux" ]; then
elif [ "$OS_ARCH" = "HP-UX" ]; then
fi
BROKER_OPTIONS="-silent"
if [ "$AMDEBUG" = "true" ]; then
echo "restart $AM_SFO_RESTART"
echo "cluster list $CLUSTER_LIST"
fi
echo "stopping JMQ Broker.."
fi
if test -f $JMQ_PID_FILE ; then
status=$?
if [ $status != 0 ]; then
echo "Could not stop the JMQ Broker"
else
echo "JMQ Broker is shutdown"
fi
fi
else
echo "JMQ Broker not running"
fi
exit 1
fi
}
echo "starting JMQ Broker"
fi
BROKER_OPTIONS="-autorestart $BROKER_OPTIONS"
fi
_jmqpid=""
if test -f $JMQ_PID_FILE ; then
brok_status=`ps -e | grep $brok_pid`
else
brok_status=""
fi
echo "JMQ Broker is already running."
fi
else
echo " $JMQEXECUTABLE -bgnd $BROKER_OPTIONS -vmargs $BROKER_VM_ARGS -name $BROKER_INSTANCE_NAME -port $BROKER_PORT -cluster $CLUSTER_LIST"
fi
$JMQEXECUTABLE -bgnd $BROKER_OPTIONS -vmargs "$BROKER_VM_ARGS" -name $BROKER_INSTANCE_NAME -port $BROKER_PORT -cluster $CLUSTER_LIST &
_jmqpid=$!
echo $_jmqpid > $JMQ_PID_FILE
fi
}
export AM_SFO_RESTART
echo "starting amsessiondb client"
fi
# Check if the server is already running.
_amqpid=""
amdb_status=""
if test -f $AM_PID_FILE ; then
amdb_status=`ps -e | grep $amdb_pid`
else
fi
echo $amdb_status
echo "AM Session DB client is already running."
fi
else
fi
echo "$AMEXECUTABLE -a $CLUSTER_LIST -u $USER_NAME -f $PASSWORDFILE -b $DATABASE_DIR $AMSESSIONDB_ARGS -m $CONF_FILE"
fi
$AMEXECUTABLE -a $CLUSTER_LIST -u $USER_NAME -f $PASSWORDFILE -b $DATABASE_DIR $AMSESSIONDB_ARGS -m $CONF_FILE >> $LOG_DIR/amsessiondb.log &
_ampid=$!
echo $_ampid > $AM_PID_FILE
fi
}
echo "stopping amsessiondb client."
fi
if test -f $AM_PID_FILE ; then
kill -TERM `cat $AM_PID_FILE`
status=$?
if [ $status != 0 ]; then
echo "Could not stop the amsessiondb client"
else
echo "amsessiondb is shutdown"
fi
fi
else
echo "amsessiondb not running"
fi
fi
}
_repeat=true
while [ $_repeat ]; do
else
sleep 2
echo "\tWait for the broker to start properly"
fi
done
}
case "$1" in
'start')
if [ "$START_BROKER" = "true" ]; then
## Wait until the broker start up properly ##
fi
;;
'stop')
## Wait untill the AMDB shuts down properly ##
if [ "$START_BROKER" = "true" ]; then
sleep 5
fi
;;
'start-jmq')
sleep 5
;;
'stop-jmq')
sleep 5
;;
'start-amsdb')
sleep 5
;;
'stop-amsdb')
sleep 5
;;
*)
echo "Usage: $0 { start | stop | start-jmq | stop-jmq | start-amsdb | stop-amsdb}"
;;
esac