From 7beb37b14dfb8465a8a36722b0d6afe3b0643263 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 20 Mar 2024 13:41:33 +0000 Subject: [PATCH] replace 02-remove-prometheus-data 02-remove-prometheus-data deletes /run/readsb-prometheus.prom when the container stops As this file is created by readsb, remove it instead in a finish script for readsb which is run when the readsb service is stopped --- .../dependencies.d/01-print-container-version | 0 .../etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down | 2 -- .../etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/type | 1 - rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up | 2 -- .../dependencies.d/02-remove-prometheus-data | 0 .../50-store-uuid/dependencies.d/02-remove-prometheus-data | 0 .../dependencies.d/02-remove-prometheus-data | 0 .../adsbx-stats/dependencies.d/02-remove-prometheus-data | 0 .../mlat-client/dependencies.d/02-remove-prometheus-data | 0 .../mlathub/dependencies.d/02-remove-prometheus-data | 0 .../dependencies.d/02-remove-prometheus-data | 0 .../readsb/dependencies.d/02-remove-prometheus-data | 0 rootfs/etc/s6-overlay/s6-rc.d/readsb/finish | 2 ++ .../s6-rc.d/user/contents.d/02-remove-prometheus-data | 0 .../etc/s6-overlay/scripts/02-remove-prometheus-data-init | 7 ------- .../{02-remove-prometheus-data-down => readsb-finish} | 0 16 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/dependencies.d/01-print-container-version delete mode 100755 rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/type delete mode 100755 rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/02-remove-prometheus-data delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/02-remove-prometheus-data create mode 100755 rootfs/etc/s6-overlay/s6-rc.d/readsb/finish delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/02-remove-prometheus-data delete mode 100755 rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-init rename rootfs/etc/s6-overlay/scripts/{02-remove-prometheus-data-down => readsb-finish} (100%) diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/dependencies.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down b/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down deleted file mode 100755 index 12913e6..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/s6-overlay/scripts/02-remove-prometheus-data-down diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/type b/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/type deleted file mode 100644 index bdd22a1..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up b/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up deleted file mode 100755 index 7bdc184..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/s6-overlay/scripts/02-remove-prometheus-data-init diff --git a/rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/readsb/finish b/rootfs/etc/s6-overlay/s6-rc.d/readsb/finish new file mode 100755 index 0000000..23065e6 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/readsb/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/readsb-finish diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/02-remove-prometheus-data b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/02-remove-prometheus-data deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-init b/rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-init deleted file mode 100755 index 7798ea9..0000000 --- a/rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-init +++ /dev/null @@ -1,7 +0,0 @@ -#!/command/with-contenv bash -# shellcheck shell=bash disable=SC1091 - -# dummy file to allow for graceful shutdown -# I don't know if we need this, but it won't hurt anything - -exit 0 diff --git a/rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-down b/rootfs/etc/s6-overlay/scripts/readsb-finish similarity index 100% rename from rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-down rename to rootfs/etc/s6-overlay/scripts/readsb-finish