forked from TheHive-Project/TheHive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.sbt
47 lines (45 loc) · 1.93 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
import Common.{stableVersion, betaVersion}
// Remove conf files
// Install service files
mappings in Universal ~= {
_.flatMap {
case (_, "conf/application.conf") => Nil
case (file, "conf/application.sample") => Seq(file -> "conf/application.conf")
case (_, "conf/logback.xml") => Nil
case other => Seq(other)
} ++ Seq(
file("package/thehive.service") -> "package/thehive.service",
file("package/thehive.conf") -> "package/thehive.conf",
file("package/thehive") -> "package/thehive",
file("package/logback.xml") -> "conf/logback.xml",
) ++ (file("migration").**(AllPassFilter) pair Path.rebase(file("migration"), "migration"))
}
// Package //
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.filterNot {
case (_, path) => path.startsWith("/opt/thehive/package") || path.startsWith("/opt/thehive/conf")
}
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.conf") -> "/etc/init/thehive.conf",
file("conf/application.sample") -> "/etc/thehive/application.conf",
file("package/logback.xml") -> "/etc/thehive/logback.xml"
).withPerms("644").withConfig(),
packageMapping(
file("package/thehive") -> "/etc/init.d/thehive"
).withPerms("755").withConfig())