# Batch script to restore the JBoss EAP server configuration

# Start batching commands
batch

# Revert the changes in the undertow subsystem
/subsystem=undertow/server=default-server/https-listener=https:undefine-attribute(name=ssl-context)
/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=security-realm,value=ApplicationRealm)

# Remove the ssl context, key manager, trust manager and keystores configuration from the elytron subsystem
/subsystem=elytron/server-ssl-context=qsSSLContext:remove
/subsystem=elytron/key-manager=qsKeyManager:remove
/subsystem=elytron/trust-manager=qsTrustManager:remove
/subsystem=elytron/key-store=qsKeyStore:remove
/subsystem=elytron/key-store=qsTrustStore:remove

# Run the batch commands
run-batch

# Reload the server configuration
reload


