Search code examples
scalarpmsbt-native-packager

Disable user/group create/delete as part of sbt native packager rpm install


I currently have both user and group defined as part of my sbt file:

daemonUser in Linux := "appuser"

daemonGroup in Linux := "appgroup"

This tries to create the user and, worse, on uninstall removes the user. The user is created by our chef scripts so i don't need the rpm to create it and by deleting it, subsequent install will re-create it with the wrong uid/gid. Is there a way to define the daemonUser, but defeat the auto-create/delete?

In the same vein, is there a way to defeat the auto-enable of the service


Solution

  • Override the RPM scriptlets by putting your versions in src/rpm/scriptlets as described here: http://www.scala-sbt.org/sbt-native-packager/GettingStartedServers/OverrdingTemplates.html