1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-11-22 05:40:10 +00:00

Simplify startup and dependencies (#69)

Move file cleanups into a finish script for the service that created the
file (replace 02 / replace 03 commits)

Currently there is a whole dependency forest just to start a couple of
startup scripts in order.
Additionally all the services also have a dependency on all the startup
scripts.
This is unnecessary complex, simplify it:
- Move startup scripts to /etc/s6-overlay/startup.d
- oneshot service named "startup" from underlying image executes
all files in /etc/s6-overlay/startup.d in alphabetical order
- Remove various oneshot scripts from longrun service dependencies
Add "startup" oneshot service to longrun service dependencies

container-version is now being run by said startup script, remove the
double s6wrap prepending of an appropriate log name.
This commit is contained in:
Fred Clausen 2024-03-23 06:46:27 -06:00 committed by GitHub
commit 2584d18e65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 5 additions and 48 deletions

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/01-print-container-version

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/02-remove-prometheus-data-down

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/02-remove-prometheus-data-init

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/03-remove-mlathub-up-down

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/03-remove-mlathub-up-init

View file

@ -1 +0,0 @@
oneshot

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/50-store-uuid

View file

@ -1 +0,0 @@
oneshot

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/60-mlathub-prep

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/mlat-client-finish

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/readsb-finish

View file

@ -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

View file

@ -1,21 +0,0 @@
#!/command/with-contenv bash
#shellcheck shell=bash disable=SC2015,SC1091
# Remove MLATHub Up
#---------------------------------------------------------------------------------------------
# Copyright (C) 2023, Ramon F. Kolb (kx1t)
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.
#---------------------------------------------------------------------------------------------
exit 0

View file

@ -20,4 +20,4 @@ source /scripts/common
# If not, see <https://www.gnu.org/licenses/>.
#---------------------------------------------------------------------------------------------
[[ -f /.CONTAINER_VERSION ]] && s6wrap --quiet --prepend=01-print-container-version --timestamps --args echo "Container Version: $(cat /.CONTAINER_VERSION), build date $(stat -c '%y' /.CONTAINER_VERSION |sed 's|\(.*\)\.[0-9]* \(.*\)|\1 \2|g')" || true
[[ -f /.CONTAINER_VERSION ]] && echo "Container Version: $(cat /.CONTAINER_VERSION), build date $(stat -c '%y' /.CONTAINER_VERSION |sed 's|\(.*\)\.[0-9]* \(.*\)|\1 \2|g')" || true