title: How to pass parameters to overridden scripts with sbt-native-packager?
body: <p>I am using sbt-native-packager to build an RPM. I have some custom scripts for preInstall and postInstall as described <a href="http://www.scala-sbt.org/sbt-native-packager/archetypes/java_server/customize.html" rel="nofollow">here</a>. Is there a way to pass parameters to these scripts from sbt?</p>
  
  <p>Thanks</p>
  
  <p>@mgosk thanks for the idea. I'm adding a comment here to be able to format it.</p>
  
  <p>I can't seem to make it work. This is in my sbt file:</p>
  
  <pre><code>val appName = "myApp" + packageSuffix
  bashScriptExtraDefines += s"appName=$appName"
  </code></pre>
  
  <p>This is my scriptlet:</p>
  
  <pre><code>${{template_declares}}
  #start (or restart) the service
  /etc/init.d/$appName restart
  </code></pre>
  
  <p>This is what get's generated in the rpm specs:</p>
  
  <pre><code>${{template_declares}}
  #start (or restart) the service
  /etc/init.d/$appName restart
  </code></pre>
  
  <p>It's exactly the same thing. No substitution. Am i missing something?</p>