From afa48b1028a228ae6cfde130a17d28f0eb0ce180 Mon Sep 17 00:00:00 2001 From: Evilham Date: Wed, 4 Aug 2021 21:00:52 +0200 Subject: [PATCH] [__single_binary_service] Support customisation of systemd units Requested by pedro --- manifest | 14 ++++++++++---- parameter/optional | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/manifest b/manifest index be967eb..fe9ef74 100755 --- a/manifest +++ b/manifest @@ -60,6 +60,8 @@ if [ -z "${SERVICE_DESCRIPTION}" ]; then SERVICE_DESCRIPTION="cdist-managed '${SERVICE_NAME}' service" fi +SERVICE_DEFINITION="$(cat "${__object}/parameter/service-definition" 2>/dev/null || true)" + DOWNLOAD_URL="$(cat "${__object}/parameter/url")" CHECKSUM="$(cat "${__object}/parameter/checksum")" SHOULD_VERSION="$(cat "${__object}/parameter/version")" @@ -102,10 +104,8 @@ INIT="$(cat "${__global}/explorer/init")" # TODO: Support non-systemd case "${INIT}" in systemd) - __systemd_unit "${SERVICE_NAME}.service" \ - --source "-" \ - --state "${STATE}" \ - --enablement-state "enabled" <