Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd mark file as non config #1351

Merged
merged 2 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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