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

Answered

Comments

1 comment

  • Avatar
    Jake

    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>
    

Please sign in to leave a comment.