jlawyerorg / j-lawyer-server-installer

Install4J project containing the multiplatform installer for the j-lawyer.org Server
GNU Affero General Public License v3.0
1 stars 0 forks source link

Installer does not set DB Password in configuration when run in automated mode #2

Closed informancer closed 3 years ago

informancer commented 3 years ago

Steps to reproduce:

vagrant@instance:~$ sudo /tmp/j-lawyer-server_unix_1_12_0_10.sh -q
Unpacking JRE ...
Starting Installer ...
The installation directory has been set to /usr/local/j-lawyer-server.
Configuring MySQL...
Extracting files ...
Enter password: 
Finishing installation ...

Expected Result

The server configuration contains a password for the DB

Actual Result

in /usr/local/j-lawyer-server/wildfly/standalone/configuration/standalone.xml, in the jlawyerdb data source:

<security>
   <user-name>root</user-name>
   <password></password>
</security>
j-dimension commented 3 years ago

@informancer while this would be possible on Windows when MySQL is selected for automatic installation, it would not work with Windows when an exisiting MySQL instance is to be used, and it would not work in general on macOS and Linux where MySQL is to be installed by the user beforehand. In those cases, the installer needs the MySQL root password to be able to create the j-lawyer.org database.

However, there is still an option to "silently" install the j-lawyer.org server by using response files. You could see that as a way to provide all input (that the installer requests from the user) in the form of a file. This way, you could create such response file and then just provide it to the installer.

Here's more information on that feature: https://www.ej-technologies.com/resources/install4j/help/doc/installers/responseFile.html

j-dimension commented 3 years ago

seems like an sed works well :-)