Question

How do I direct the installer to perform actions after installation finishes?

How do I direct the installer to perform actions after installation finishes?

Answer:

You can direct the installer to perform some actions after installation is complete by using the <postInstallationActionList> section. The following example makes the installer run different scripts at the end of the installatiion process depending on whether or not is the root user who is performing the installation.

<postInstallationActionList>
  <runProgram>
    <program>${installdir}/scripts/root_script.sh</program>
    <programArguments>${installdir}</programArguments>
    <ruleList>
      <compareText>
       <logic>equals</logic>
       <text>${installer_root_install}</text>
       <value>1</value>
       </compareText>
    </ruleList>
  </runProgram>
  <runProgram>
    <program>${installdir}/scripts/myscript.sh</program>
    <programArguments>${installdir}</programArguments>
    <ruleList>
      <compareText>
       <logic>equals</logic>
       <text>${installer_root_install}</text>
       <value>0</value>
      </compareText>
    </ruleList>
  </runProgram>
</postInstallationActionList>