diff --git a/src/main/scala/com/typesafe/sbt/packager/archetypes/JavaServerApplication.scala b/src/main/scala/com/typesafe/sbt/packager/archetypes/JavaServerApplication.scala index a7c8e5528..2f4c8d1aa 100644 --- a/src/main/scala/com/typesafe/sbt/packager/archetypes/JavaServerApplication.scala +++ b/src/main/scala/com/typesafe/sbt/packager/archetypes/JavaServerApplication.scala @@ -62,9 +62,10 @@ object JavaServerAppPackaging extends AutoPlugin { }, makeEtcDefault <<= (packageName in Linux, target in Universal, linuxEtcDefaultTemplate, linuxScriptReplacements) map makeEtcDefaultScript, - linuxPackageMappings <++= (makeEtcDefault, packageName in Linux) map { (conf, name) => - conf.map(c => LinuxPackageMapping(Seq(c -> ("/etc/default/" + name)), - LinuxFileMetaData(Users.Root, Users.Root, "644")).withConfig()).toSeq + linuxPackageMappings <++= (makeEtcDefault, bashScriptConfigLocation) map { (conf, configLocation) => + configLocation.flatMap { path => + conf.map(c => LinuxPackageMapping(Seq(c -> path), LinuxFileMetaData(Users.Root, Users.Root, "644")).withConfig()) + }.toSeq }, // === /var/run/app pid folder ===