wls_admin_operations.sh
#!/bin/bash
export SERVER_LOG=/opt/admin/fmw/
start() {
echo "Starting WebLogic Server(s)..."
echo $SUDO_USER "gave start command for Admin Server at" `/bin/date` > $SERVER_LOG/startup.log
nohup /opt/admin/fmw/domains/myDomain/bin/startWebLogic.sh > $SERVER_LOG/startup.log 2>&1
}
stop() {
echo "Stopping WebLogic Server(s)..."
echo $SUDO_USER "gave stop command for Admin Server at" `/bin/date` > $SERVER_LOG/shutdown.log
nohup /opt/admin/fmw/domains/myDomain/bin/stopWebLogic.sh > $SERVER_LOG/shutdown.log 2>&1
}
restart() {
echo "Stopping WebLogic Server(s)..."
echo $SUDO_USER "gave stop command for Admin Server at" `/bin/date` > $SERVER_LOG/shutdown.log
nohup /opt/admin/fmw/domains/myDomain/bin/stopWebLogic.sh > $SERVER_LOG/shutdown.log 2>&1
sleep 40
echo "Starting WebLogic Server(s)..."
echo $SUDO_USER "gave start command for Admin Server at" `/bin/date` > $SERVER_LOG/startup.log
nohup /opt/admin/fmw/domains/myDomain/bin/startWebLogic.sh > $SERVER_LOG/startup.log 2>&1
}
case "$1" in
"start")
start
;;
"stop")
stop
;;
"restart")
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
#!/bin/bash
export SERVER_LOG=/opt/admin/fmw/
start() {
echo "Starting WebLogic Server(s)..."
echo $SUDO_USER "gave start command for Admin Server at" `/bin/date` > $SERVER_LOG/startup.log
nohup /opt/admin/fmw/domains/myDomain/bin/startWebLogic.sh > $SERVER_LOG/startup.log 2>&1
}
stop() {
echo "Stopping WebLogic Server(s)..."
echo $SUDO_USER "gave stop command for Admin Server at" `/bin/date` > $SERVER_LOG/shutdown.log
nohup /opt/admin/fmw/domains/myDomain/bin/stopWebLogic.sh > $SERVER_LOG/shutdown.log 2>&1
}
restart() {
echo "Stopping WebLogic Server(s)..."
echo $SUDO_USER "gave stop command for Admin Server at" `/bin/date` > $SERVER_LOG/shutdown.log
nohup /opt/admin/fmw/domains/myDomain/bin/stopWebLogic.sh > $SERVER_LOG/shutdown.log 2>&1
sleep 40
echo "Starting WebLogic Server(s)..."
echo $SUDO_USER "gave start command for Admin Server at" `/bin/date` > $SERVER_LOG/startup.log
nohup /opt/admin/fmw/domains/myDomain/bin/startWebLogic.sh > $SERVER_LOG/startup.log 2>&1
}
case "$1" in
"start")
start
;;
"stop")
stop
;;
"restart")
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
No comments:
Post a Comment