Skip to content

Instantly share code, notes, and snippets.

@wstrange
Created October 20, 2011 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wstrange/1301882 to your computer and use it in GitHub Desktop.
Save wstrange/1301882 to your computer and use it in GitHub Desktop.
Startup script for Weblogic Admin domain and managed servers
#!/bin/bash
# Start up script for a weblogic admin domain and associated service domains
# This is meant for demos and interactive usage
# A new gnome-terminal will be launched to show the output. You need
# X running
#
# Usage: wlstart.sh domain servers..
# Example: wlstart.sh IDMDomain wls_oif1
# Set your domain home
DOMAIN_HOME=/oracle/Middleware/user_projects/domains
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -gt 1 ] || die "Usage: wlstart.sh domain servers..."
domain=$1
shift
echo "Starting Admin server for $domain"
cmd=$DOMAIN_HOME/$domain/startWebLogic.sh
[ -x $cmd ] || die "$cmd not found. Does the domain exist?"
gnome-terminal -t "Admin Domain $domain" -e "$cmd"
echo "Sleeping a while to give the Admin server a chance to start up..."
sleep 30
while (( "$#")); do
echo starting managed server $1
cmd="$DOMAIN_HOME/$domain/bin/startManagedWebLogic.sh $1"
# Echo command -in case we want to cut n paste it later
echo $cmd
gnome-terminal -t $1 -e "$cmd"
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment