-
Notifications
You must be signed in to change notification settings - Fork 626
/
package.sbt
50 lines (49 loc) · 2.02 KB
/
package.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Common.remapPath
// Remove conf files
// Install service files
mappings in Universal ~= {
_.flatMap {
case (_, "conf/application.conf") => Nil
case (file, "conf/application.sample.conf") => Seq(file -> "conf/application.conf")
case (_, "conf/logback.xml") => Nil
case (_, "conf/logback-migration.xml") => Nil
case other => Seq(other)
} ++ Seq(
file("package/logback.xml") -> "conf/logback.xml",
file("package/logback-migration.xml") -> "conf/logback-migration.xml"
)
}
// Package //
packageName := "thehive4"
maintainer := "TheHive Project <[email protected]>"
packageSummary := "Scalable, Open Source and Free Security Incident Response Solutions"
packageDescription :=
"""TheHive is a scalable 3-in-1 open source and free security incident response
| platform designed to make life easier for SOCs, CSIRTs, CERTs and any
| information security practitioner dealing with security incidents that need to
| be investigated and acted upon swiftly.""".stripMargin
defaultLinuxInstallLocation := "/opt"
linuxPackageMappings ~= {
_.map { pm =>
val mappings = pm
.mappings
.map(remapPath("thehive4", "thehive", "/etc", "/opt", "/var/log"))
.filterNot {
case (_, path) => path.startsWith("/opt/thehive/conf") || path.startsWith("/usr/bin")
}
com.typesafe.sbt.packager.linux.LinuxPackageMapping(mappings, pm.fileData)
}
}
linuxPackageMappings ++= Seq(
packageMapping(
file("package/thehive.service") -> "/usr/lib/systemd/system/thehive.service"
).withPerms("644"),
packageMapping(
file("package/thehive.default") -> "/etc/default/thehive",
file("conf/application.sample.conf") -> "/etc/thehive/application.conf",
file("package/logback.xml") -> "/etc/thehive/logback.xml",
file("package/logback-migration.xml") -> "/etc/thehive/logback-migration.xml"
).withPerms("644").withConfig()
)
daemonUser := "thehive"
bashScriptEnvConfigLocation := None