Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute script after installation in izpack

I have made jar file which contanins jboss and I want to start my web application when jar extracts and installed completly on my machine. where should i write script or code or xml tag in izpack so that after installing the application standalone.sh run automatically and my jboss run in the background and my application deployed successfully

like image 867
Saxena Shekhar Avatar asked Jan 28 '26 03:01

Saxena Shekhar


2 Answers

Just in case somebody stumbles upon this thread as i just did:

You can include an "executable" element in your install "pack" element which will execute as custom script: izpack documentation

like image 89
jo- Avatar answered Jan 31 '26 14:01

jo-


You can use <executable> tags in your pack definitions to specify which files are executables. The key is to have stage="postinstall" attribute so izpack executes the file after installation is complete and to set keep="true" so izpack does not remove it.

For example:

<executable targetfile="$INSTALL_PATH/bin/some-secript"
                 os="unix" stage="postinstall" failure="warn" keep="true"/>

documentation

like image 21
Aniket Thakur Avatar answered Jan 31 '26 14:01

Aniket Thakur