WSCP script to automate WebSphere Enterprise App shutdown. Called from Windows shell script.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | echo off
echo ****************************************
echo * stop WSAPP Enterprise App on %COMPUTERNAME%
echo ****************************************
setlocal
set ENTAPP=/EnterpriseApp:WSAPP/
call wscp -p c:\scripts\websphere\wscp_properties.txt ^
-f c:\scripts\tcl\stop_ent_app.tcl ^
-- %ENTAPP%
endlocal
---------------------------------------------------
if {$argc < 0} {
error "no arguments"
puts "no arguments"
}
set entApp [lindex $argv 0]
puts "stopping Enterprise App $entApp"
puts "EnterpriseApp stop $entApp"
if {[catch {EnterpriseApp stop $entApp} result_var] ==0} {
puts $result_var
puts "$entApp stopped sucessfully"
} else {
puts $result_var
error "$entApp failed to stop"
}
set status [EnterpriseApp show $entApp -attribute {Name CurrentState}]
puts "status = $status"
|
Automate Enterprise App shutdown.