Comments

1 comment

  • Avatar
    Michiel

    You can create a java launcher using <createJavaLaunchers> and then create a service using <createOSXService>

    <postInstallationActionList>
       ...
        <createJavaLaunchers>
          <destination>${installdir}</destination>
          <javaLauncherList>
            <javaLauncher>
              <binaryName>sample</binaryName>
              <jarFile>${installdir}/sampleJavaApp.jar</jarFile>
            </javaLauncher>
          </javaLauncherList>
        </createJavaLaunchers>
     ...
         <createOSXService>
          <keepAlive>1</keepAlive>
          <program>${installdir}/sample.app/Contents/MacOS/installbuilder.sh</program>
          <programArguments>--service</programArguments>
          <serviceName>com.bitrock.sample</serviceName>
          <scope>user</scope>
          <username>daemon</username>
          <groupname>wheel</groupname>
        </createOSXService>
      ...
      </postInstallationActionList>
    

    To delete the service you can use <deleteOsxServixe>:

     <preUninstallationActionList>
       ...
        <deleteOSXService>
            <serviceName>com.bitrock.sample</serviceName>
            <scope>system</scope>
        </deleteOSXService>
        ...
    </preUninstallationActionList>
    

Please sign in to leave a comment.