Customization of application start script

Hello there :slight_smile:
I need to add few lines of code in the already existing start script generated from the application plugin. I can do something like:

   unixStartScriptGenerator = ScriptGenerator { javaAppStartScriptGenerationDetails, writer -> 

But I have no idea how to proceed afterwards. Is there any guide or well done example that can help?
What I need to achieve is to set an environment variable in unix environment before launching the JRE while keeping intact the windows script.

PS: I guess the configure closure is somehow wrong. I just started messing around with Gradle :sweat_smile: