Configuring administration service using scripts – Silent mode

#-- Configuring administration service 

set aServer [$AdminConfig getid /Node:myNode/Server:newServer/]
set aAdminService [$AdminConfig list AdminService $aServer]

# configure general properties
# set standalone to false if the application server participates in the network deployment system
set standaloneAttr [list standalone true]
# change preferred connector to RMI
set connectors [lindex [$AdminConfig showAttribute $aAdminService connectors]]
set rmiConnector false
puts "List all connectors:"
foreach aConnector $connectors {
puts [$AdminConfig showall $aConnector]
if {[regexp RMIConnector $aConnector] == 1} {
set rmiConnector $aConnector
set perfConnAttr [list preferredConnector $rmiConnector]
set attrs [list $standaloneAttr $perfConnAttr]
puts "Modify general properties"
$AdminConfig modify $aAdminService $attrs
puts [$AdminConfig show $aAdminService]

puts "Modify repository service"
set configRepo [$AdminConfig showAttribute $aAdminService configRepository]
$AdminConfig modify $configRepo [list [list auditEnabled false]]

$AdminConfig save

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.