Autostart Script for Websphere Services on Linux
This works on me …
#!/bin/bash
# Source function library.
. /etc/init.d/functions
#Developed by Dadan
WAS_HOME=/opt/IBM/WebSphere/AppServer
export WAS_HOME
start() {
# WebSphere® Application Server, start Deployment Manager
$WAS_HOME/profiles/ctgDmgr01/bin/startManager.sh
# WebSphere Application Server, start Node
$WAS_HOME/profiles/ctgAppSrv01/bin/startNode.sh
# WebSphere Application Server, start webserver1
$WAS_HOME/profiles/ctgAppSrv01/bin/startServer.sh webserver1 -username wasadmin -password r4h4514
# WebSphere Application Server, start MXServer
$WAS_HOME/profiles/ctgAppSrv01/bin/startServer.sh MXServer -username wasadmin -password r4h4514
# WebSphere Application Server, start HTTP Server and webserver1
/opt/IBM/HTTPServer/bin/apachectl start
return $RETVAL
}
stop() {
# WebSphere Application Server, start HTTP Server and webserver1
/opt/IBM/HTTPServer/bin/apachectl stop
# WebSphere Application Server, start MXServer
$WAS_HOME/profiles/ctgAppSrv01/bin/stopServer.sh MXServer -username wasadmin -password r4h4514
# WebSphere Application Server, start webserver1
$WAS_HOME/profiles/ctgAppSrv01/bin/stopServer.sh webserver1 -username wasadmin -password r4h4514
# WebSphere Application Server, start Node
$WAS_HOME/profiles/ctgAppSrv01/bin/stopNode.sh
# WebSphere® Application Server, start Deployment Manager
$WAS_HOME/profiles/ctgDmgr01/bin/stopManager.sh
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit $?
exit $RETVAL
Berbagi :