Search code examples
playframework-2.0sbtsbt-native-packager

the SBT native packager does not generate any sysv /etc/init.d/ script


I am creating a debian package for a play 2.3.8 application.

I use the following settings:

 val settings = Seq(
   debianPackageDependencies in Debian := "openjdk-7-jre (>= 1.7.0)" :: Nil,
   maintainer in Linux := "team <[email protected]>",
   packageSummary in Linux := "app",
   packageDescription := "description",
   serverLoading in Debian := ServerLoader.SystemV,
   linuxPackageMappings in Debian := linuxPackageMappings.value.map { p ⇒
     val newMappings = p.mappings.filterNot { f ⇒
       f._2.endsWith("conf//messages") ||
       f._2.endsWith("conf//play.plugins")
     }
     p.copy(mappings = newMappings)
   },
   daemonUser in Linux := (normalizedName in Debian).value
)

But no /etc/init.d/ script is generated.

If I remove the transformation of linuxPackageMappings then a init.d script is generated.


Solution

  • Instead of using linuxPackageMappings in Debian := linuxPackageMappings.value..., I used linuxPackageMappings := linuxPackageMappings.value.

    And now it is working.