Wikipedia

Search results

Monday, 16 April 2018

Start Websphere Application Server automatically with shell scripting

#!/bin/sh 
#
# script to start and stop WebSphere Application Server 5.x
# WAS_HOME="/opt/WebSphere/AppServer" # WAS install dir 

SERVERS="server1 MyAppServer" # list of app servers
 if [ ! -d "${WAS_HOME}" ]; then
   echo "$0: ${WAS_HOME} does not exist, aborting" >&2
   exit 1 

fi 
case "$1" in 

’start’)  # increase resource limits
   ulimit -n 1024
   ulimit -s 16384 
   for s in ${SERVERS}; do
       ${WAS_HOME}/bin/startServer.sh $s 
   done
 ;; 

’stop’) 
    for s in ${SERVERS}; do
        ${WAS_HOME}/bin/stopServer.sh $s 
   done
    ;; 

’status’) ${WAS_HOME}/bin/serverStatus.sh -all 
 ;;

 *)
  echo "Usage: $0 " <start|stop|status>
    exit 1 
   ;;

esac


No comments:

Post a Comment