In this example the script live in a the folder/scripts/admin in the WebSphere bin directory
websphere.sh
#!/bin/sh
#
# WebSphere This shell script takes care of starting and stopping
# the WebSphere services during server reboot.
#
# See how we were called.
case "$1" in
start)
# Start websphere.
su - wasadm -c /<was_root>/bin/scripts/admin/startup.sh
;;
stop)
# Stop websphere.
su - wasadm -c /<was_root>/bin/scripts/admin/shutdown.sh
;;
restart)
$0 stop
$0 start
;;
*)
echo $"Usage: websphere.sh {start|stop}"
exit 1
esac
exit 0
----------------------------------------------------------------------
startup.sh
#sh
/<was_root>/profiles/dmgr/bin/startManager.sh -nowait
/<was_root>/profiles/<node_nn>/bin/startNode.sh -nowait
----------------------------------------------------------------------
shutdown.sh
#sh
/<was_root>/profiles/<node_nn>/bin/stopServer.sh clustera_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone03
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone04
/<was_root>/profiles/<node_nn>bin/stopServer.sh clusterb_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clusterb_clone02
/<was_root>/profiles/<node_nn>bin/stopNode.sh
/<was_root>/profiles/dmgr/bin/stopManager.sh
---------------------------------------------------------------------
websphere.sh
#!/bin/sh
#
# WebSphere This shell script takes care of starting and stopping
# the WebSphere services during server reboot.
#
# See how we were called.
case "$1" in
start)
# Start websphere.
su - wasadm -c /<was_root>/bin/scripts/admin/startup.sh
;;
stop)
# Stop websphere.
su - wasadm -c /<was_root>/bin/scripts/admin/shutdown.sh
;;
restart)
$0 stop
$0 start
;;
*)
echo $"Usage: websphere.sh {start|stop}"
exit 1
esac
exit 0
----------------------------------------------------------------------
startup.sh
#sh
/<was_root>/profiles/dmgr/bin/startManager.sh -nowait
/<was_root>/profiles/<node_nn>/bin/startNode.sh -nowait
----------------------------------------------------------------------
shutdown.sh
#sh
/<was_root>/profiles/<node_nn>/bin/stopServer.sh clustera_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone03
/<was_root>/profiles/<node_nn>bin/stopServer.sh clustera_clone04
/<was_root>/profiles/<node_nn>bin/stopServer.sh clusterb_clone01
/<was_root>/profiles/<node_nn>bin/stopServer.sh clusterb_clone02
/<was_root>/profiles/<node_nn>bin/stopNode.sh
/<was_root>/profiles/dmgr/bin/stopManager.sh
---------------------------------------------------------------------
No comments:
Post a Comment