Skip to content

Instantly share code, notes, and snippets.

@willis7
Last active December 21, 2015 07:58
Show Gist options
  • Save willis7/6274606 to your computer and use it in GitHub Desktop.
Save willis7/6274606 to your computer and use it in GitHub Desktop.
# unpack.py: convert from unpack command to wlst script
# This script shows how to convert from the unpack command to a wlst script.
# Note that the domain and template values, and the options to setOption, must be single-quoted
# Specify the template that you want to use
readTemplate('c:\wls9\user_templates\wlst_wls_template.jar')
# If you specified the -username and -password option in the unpack command,
# Specify them here. Otherwise, delete these lines`
# Note that the domain_name field here is just the name of the domain, not the full path as specified in writeDomain below
cd ('/Security/<domain-name>')
create (<user_name>,'User')
cd ('User/<user_name>')
set ('Password',<password>)
# analogous to unpack -java_home
setOption('JavaHome',<java_home>)
# analogous to unpack -server_start_mode
setOption('ServerStartMode',<server_start_mode>)
# analogous to unpack -app_dir
setOption('AppDir',<app_dir>)
# write the domain
writeDomain(<domain>)
closeTemplate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment