From 5c0b9b0285b35c2f507332706d0302c188248f64 Mon Sep 17 00:00:00 2001 From: Max Ulidtko Date: Mon, 5 Feb 2024 17:18:22 +0100 Subject: [PATCH] packaging: fix install path for {loki,promtail}.service --- tools/packaging/loki-postinstall.sh | 2 +- tools/packaging/nfpm.jsonnet | 4 ++-- tools/packaging/promtail-postinstall.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/packaging/loki-postinstall.sh b/tools/packaging/loki-postinstall.sh index 69e12950617be..f5588301eca73 100644 --- a/tools/packaging/loki-postinstall.sh +++ b/tools/packaging/loki-postinstall.sh @@ -20,7 +20,7 @@ cleanInstall() { # even if you want your service to run as non root. if [ "${systemd_version}" -lt 231 ]; then printf "\033[31m systemd version %s is less then 231, fixing the service file \033[0m\n" "${systemd_version}" - sed -i "s/=+/=/g" /etc/systemd/system/loki.service + sed -i "s/=+/=/g" /usr/lib/systemd/system/loki.service fi printf "\033[32m Reload the service unit from disk\033[0m\n" systemctl daemon-reload ||: diff --git a/tools/packaging/nfpm.jsonnet b/tools/packaging/nfpm.jsonnet index aff88fe658741..57f0024be3374 100644 --- a/tools/packaging/nfpm.jsonnet +++ b/tools/packaging/nfpm.jsonnet @@ -20,7 +20,7 @@ local overrides = { contents+: [ { src: './tools/packaging/loki.service', - dst: '/etc/systemd/system/loki.service', + dst: '/usr/lib/systemd/system/loki.service', }, { src: './cmd/loki/loki-local-config.yaml', @@ -42,7 +42,7 @@ local overrides = { contents+: [ { src: './tools/packaging/promtail.service', - dst: '/etc/systemd/system/promtail.service', + dst: '/usr/lib/systemd/system/promtail.service', }, { src: './tools/packaging/promtail-minimal-config.yaml', diff --git a/tools/packaging/promtail-postinstall.sh b/tools/packaging/promtail-postinstall.sh index a2b1ae91ee9d4..5b62fa3c3ce5d 100644 --- a/tools/packaging/promtail-postinstall.sh +++ b/tools/packaging/promtail-postinstall.sh @@ -20,7 +20,7 @@ cleanInstall() { # even if you want your service to run as non root. if [ "${systemd_version}" -lt 231 ]; then printf "\033[31m systemd version %s is less then 231, fixing the service file \033[0m\n" "${systemd_version}" - sed -i "s/=+/=/g" /etc/systemd/system/promtail.service + sed -i "s/=+/=/g" /usr/lib/systemd/system/promtail.service fi printf "\033[32m Reload the service unit from disk\033[0m\n" systemctl daemon-reload ||: