Created
October 20, 2011 18:24
-
-
Save wstrange/1301882 to your computer and use it in GitHub Desktop.
Startup script for Weblogic Admin domain and managed servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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