| | |
| | | ! --> |
| | | <stax> |
| | | |
| | | <!-- This function configures DS using the configure-ds script --> |
| | | <!-- This function sets up DS using the setup script --> |
| | | <function name="SetUpDsWithScript"> |
| | | <function-prolog> |
| | | This function sets up a Directory Server using a script |
| | |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filename"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsNoWindowsService" type="optional"> |
| | | <function-arg-description> |
| | | Do not enable as a Windows Service |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="boolean"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsHelp" type="optional"> |
| | | <function-arg-description> |
| | | Help option |
| | |
| | | |
| | | if dsBindPwdFile: |
| | | STAFCmdParamsList.append('-j "%s"' % dsBindPwdFile) |
| | | |
| | | if dsNoWindowsService: |
| | | STAFCmdParamsList.append('-n') |
| | | |
| | | if dsHelp: |
| | | STAFCmdParamsList.append('-H') |
| | |
| | | </sequence> |
| | | </function> |
| | | |
| | | <!-- This function configures DS using the configure-ds script --> |
| | | <function name="ConfigureDsWithScript"> |
| | | <function-prolog> |
| | | This function configures a Directory Server using a script |
| | | </function-prolog> |
| | | <function-map-args> |
| | | <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine"> |
| | | <function-arg-description> |
| | | Location of target host |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="hostname"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)"> |
| | | <function-arg-description> |
| | | Pathname to installation root |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsVersion" type="optional"> |
| | | <function-arg-description> |
| | | Display Directory Server version information |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsLdapPort" type="optional"> |
| | | <function-arg-description> |
| | | Directory server LDAP port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsLdapsPort" type="optional"> |
| | | <function-arg-description> |
| | | Directory server LDAPS port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsEnableStartTLS" type="optional"> |
| | | <function-arg-description> |
| | | Specifies whether to enable or not StartTLS |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsJmxPort" type="optional"> |
| | | <function-arg-description> |
| | | Directory server JMX port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsKeyManagerProviderDN" type="optional"> |
| | | <function-arg-description> |
| | | DN of the key manager provider to use for SSL and/or StartTLS |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsTrustManagerProviderDN" type="optional"> |
| | | <function-arg-description> |
| | | DN of the trust manager provider to use for SSL and/or StartTLS |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsKeyManagerPath" type="optional"> |
| | | <function-arg-description> |
| | | Path of the keystore to be used by the key manager provider |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsCertNickName" type="optional"> |
| | | <function-arg-description> |
| | | Nickname of the certificate |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsBaseDN" type="optional"> |
| | | <function-arg-description> |
| | | Base DN (only single base DN supported). |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="DN"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsRootUserDN" type="optional"> |
| | | <function-arg-description> |
| | | Root User Bind DN |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="DN"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsRootPassword" type="optional"> |
| | | <function-arg-description> |
| | | Root User Bind password |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsRootPasswordFile" type="optional"> |
| | | <function-arg-description> |
| | | Root User password file |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filename"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsHelp" type="optional"> |
| | | <function-arg-description> |
| | | Help option |
| | | </function-arg-description> |
| | | <function-arg-property name="help" value="option"/> |
| | | </function-arg-def> |
| | | </function-map-args> |
| | | |
| | | <sequence> |
| | | |
| | | <!-- Build the Command --> |
| | | <script> |
| | | STAFCmdParamsList=[] |
| | | STAFCmdParams='' |
| | | |
| | | if dsPath: |
| | | dsBinPath='%s/%s' % (dsPath,fileFolder) |
| | | STAFCmd='%s/configure-ds%s' % (dsBinPath,fileExt) |
| | | |
| | | if dsVersion: |
| | | STAFCmdParamsList.append('-V %s' % dsVersion) |
| | | |
| | | if dsLdapPort: |
| | | STAFCmdParamsList.append('-p %s' % dsLdapPort) |
| | | |
| | | if dsLdapsPort: |
| | | STAFCmdParamsList.append('-P %s' % dsLdapsPort) |
| | | |
| | | if dsEnableStartTLS: |
| | | STAFCmdParamsList.append('-q %s' % dsEnableStartTLS) |
| | | |
| | | if dsJmxPort: |
| | | STAFCmdParamsList.append('-x %s' % dsJmxPort) |
| | | |
| | | if dsKeyManagerProviderDN: |
| | | STAFCmdParamsList.append('-k "%s"' % dsKeyManagerProviderDN) |
| | | |
| | | if dsTrustManagerProviderDN: |
| | | STAFCmdParamsList.append('-t "%s"' % dsTrustManagerProviderDN) |
| | | |
| | | if dsKeyManagerPath: |
| | | STAFCmdParamsList.append('-m "%s"' % dsKeyManagerPath) |
| | | |
| | | if dsCertNickName: |
| | | STAFCmdParamsList.append('-a "%s"' % dsCertNickName) |
| | | |
| | | if dsBaseDN: |
| | | STAFCmdParamsList.append('-b "%s"' % dsBaseDN) |
| | | |
| | | if dsRootUserDN: |
| | | STAFCmdParamsList.append('-D "%s"' % dsRootUserDN) |
| | | |
| | | if dsRootPassword: |
| | | STAFCmdParamsList.append('-w "%s"' % dsRootPassword) |
| | | |
| | | if dsRootPasswordFile: |
| | | STAFCmdParamsList.append('-j "%s"' % dsRootPasswordFile) |
| | | |
| | | if dsHelp: |
| | | STAFCmdParamsList.append('-H') |
| | | |
| | | STAFCmdParams=' '.join(STAFCmdParamsList) |
| | | </script> |
| | | |
| | | <message> |
| | | '%s %s' % (STAFCmd, STAFCmdParams) |
| | | </message> |
| | | |
| | | <process name="'Setup DS Script'"> |
| | | <location>'%s' % location</location> |
| | | <command>'%s' % STAFCmd</command> |
| | | <parms>'%s' % STAFCmdParams</parms> |
| | | <workdir>'%s' % dsBinPath</workdir> |
| | | <envs> |
| | | ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] |
| | | </envs> |
| | | <console use="'same'"/> |
| | | <stderr mode="'stdout'"/> |
| | | <returnstdout/> |
| | | </process> |
| | | <call function="'checkRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </function> |
| | | |
| | | <!-- This function starts DS using the start-ds script --> |
| | | <function name="StartDsWithScript"> |
| | | <function-prolog> |
| | |
| | | |
| | | <if expr="STAXCode != 0"> |
| | | <sequence> |
| | | <message> |
| | | <message level="'error'"> |
| | | 'Copy of totalupdate task failed (STAXCode=%s)' % STAXCode |
| | | </message> |
| | | <return>[STAXCode, STAXReason]</return> |