Skip to content

Commit 27cedb1

Browse files
Alessandro Rattivpiserchia
authored andcommitted
Add systemd support for packages creation and fix configuration's template
Signed-off-by: Vito Piserchia <[email protected]>
1 parent 55c2ab8 commit 27cedb1

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

build.sbt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ coverageExcludedPackages := "<empty>;controllers.*;views.*;models.*"
6060
* Allow packaging as part of the build
6161
*/
6262
enablePlugins(SbtNativePackager)
63+
/*
64+
* Enable systemd as systemloader
65+
*/
66+
67+
enablePlugins(SystemdPlugin)
68+
69+
/*
70+
* Start service as user root
71+
*/
72+
73+
daemonUser in Linux := "root"
6374

6475
/* Debian Settings - to create, run as:
6576
$ sbt debian:packageBin

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
3131
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.1")
3232

3333
// Support packaging plugins
34-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.5")
34+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.3")
3535

3636
resolvers += Classpaths.sbtPluginReleases
3737

src/templates/etc-default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# Setting JAVA_OPTS
2222
# -----------------
23-
JAVA_OPTS="-Dpidfile.path=/var/run/${{app_name}}.pid -Dconfig.file=/etc/${{app_name}}/application.conf -Dlogger.file=/etc/${{app_name}}/logger.xml $JAVA_OPTS"
23+
JAVA_OPTS="-Dpidfile.path=/var/run/${{app_name}}.pid -Dconfig.file=/etc/${{app_name}}/application.conf -Dlogger.file=/etc/${{app_name}}/logger.xml"
2424

2525
# Setting PIDFILE
2626
# ---------------

0 commit comments

Comments
 (0)