user0000001
user0000001

Reputation: 2233

install4j: Executing bash file

I am trying to run a bash file from install4j6. install4j does indeed try to run the bash file but it just returns an error at the end of the installation. The error is very generic and has no code reference or anything that will help me determine a solution - just a message that says "Error while executing file."

The only thing I can provide is how I have it setup in install4j6 since I am pretty sure that's my issue.

The bash file is defined in the root of my installation directory distribution tree and is named set_permissions.sh. For the sake of eliminating permissions being a cause, the file permission mode is set to 777 (both in install4j and on the file system).

I believe the issue is related to what I have set as my "working directory". I currently have it set to just ".". Is there a way to debug this further? Maybe get an actual error as to why it's not executing?

Upvotes: 1

Views: 1142

Answers (1)

Serban Constantin
Serban Constantin

Reputation: 3576

Ok, first a few things to check:

  • make sure that you're running the batch file after the install files step (you mention it being at the root of your install)
  • best to have the wait for termination checked and a variable for the return code.
  • redirect stderr to the log file (just in case)

As for working directory, . should work, but you can change it to ${installer:sys.installationDir} to make sure that it references the installation directory chosen by the user. You can also set the executable in the form of ${installer:sys.installationDir}\set_permissions.sh

Also, try and run just your shell script to make sure that it works :)

Upvotes: 2

Related Questions