Skip to content

Commit 07d7b84

Browse files
authored
Systemd mark file as non config (#1351)
* systemd-mark-file-as-non-config: Add configuration paramets to escape marking app_name.service as config. * systemd-mark-file-as-non-config: Change docs.
1 parent 253c5bc commit 07d7b84

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/main/scala/com/typesafe/sbt/packager/archetypes/systemloader/SystemdPlugin.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ object SystemdPlugin extends AutoPlugin {
3434
object autoImport {
3535
val systemdSuccessExitStatus =
3636
settingKey[Seq[String]]("SuccessExitStatus property")
37+
val systemdIsServiceFileConfig =
38+
settingKey[Boolean]("Make app_name.service file as config.")
3739
}
3840

3941
import autoImport._
@@ -51,12 +53,13 @@ object SystemdPlugin extends AutoPlugin {
5153
requiredStopFacilities := Some("network.target"),
5254
systemdSuccessExitStatus := Seq.empty,
5355
linuxStartScriptName := Some(packageName.value + ".service"),
56+
systemdIsServiceFileConfig := true,
5457
// add systemloader to mappings
5558
linuxPackageMappings ++= startScriptMapping(
5659
linuxStartScriptName.value,
5760
linuxMakeStartScript.value,
5861
defaultLinuxStartScriptLocation.value,
59-
isConf = true
62+
systemdIsServiceFileConfig.value
6063
),
6164
// add additional system configurations to script replacements
6265
linuxScriptReplacements += ("SuccessExitStatus" -> systemdSuccessExitStatus.value.mkString(" ")),

src/sphinx/archetypes/systemloaders.rst

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ Settings
8080
termination, in addition to the normal successful exit code ``0`` and the signals ``SIGHUP``, ``SIGINT``,
8181
``SIGTERM``, and ``SIGPIPE``. Exit status definitions can either be numeric exit codes or termination signal names.
8282

83+
``systemdIsServiceFileConfig``
84+
Should file app_name.service be marked as config. Default is ``true``. If it is set to ``true``, file will be
85+
marked ``%config`` in rpm package for example.
86+
8387
Upstart
8488
-------
8589

0 commit comments

Comments
 (0)