Skip to content

Commit

Permalink
Systemd mark file as non config (#1351)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
tolikr committed Jul 8, 2020
1 parent 253c5bc commit 07d7b84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ object SystemdPlugin extends AutoPlugin {
object autoImport {
val systemdSuccessExitStatus =
settingKey[Seq[String]]("SuccessExitStatus property")
val systemdIsServiceFileConfig =
settingKey[Boolean]("Make app_name.service file as config.")
}

import autoImport._
Expand All @@ -51,12 +53,13 @@ object SystemdPlugin extends AutoPlugin {
requiredStopFacilities := Some("network.target"),
systemdSuccessExitStatus := Seq.empty,
linuxStartScriptName := Some(packageName.value + ".service"),
systemdIsServiceFileConfig := true,
// add systemloader to mappings
linuxPackageMappings ++= startScriptMapping(
linuxStartScriptName.value,
linuxMakeStartScript.value,
defaultLinuxStartScriptLocation.value,
isConf = true
systemdIsServiceFileConfig.value
),
// add additional system configurations to script replacements
linuxScriptReplacements += ("SuccessExitStatus" -> systemdSuccessExitStatus.value.mkString(" ")),
Expand Down
4 changes: 4 additions & 0 deletions src/sphinx/archetypes/systemloaders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Settings
termination, in addition to the normal successful exit code ``0`` and the signals ``SIGHUP``, ``SIGINT``,
``SIGTERM``, and ``SIGPIPE``. Exit status definitions can either be numeric exit codes or termination signal names.

``systemdIsServiceFileConfig``
Should file app_name.service be marked as config. Default is ``true``. If it is set to ``true``, file will be
marked ``%config`` in rpm package for example.

Upstart
-------

Expand Down

0 comments on commit 07d7b84

Please sign in to comment.