Skip to content

Commit

Permalink
Simplify startup and dependencies (#69)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fredclausen authored Mar 23, 2024
2 parents 357a77e + ab0e9a3 commit 2584d18
Show file tree
Hide file tree
Showing 61 changed files with 5 additions and 48 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/02-remove-prometheus-data/up

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/down

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/03-remove-mlathub-up/up

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/mlat-client/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/mlat-client-finish
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/readsb/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/readsb-finish
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
7 changes: 0 additions & 7 deletions rootfs/etc/s6-overlay/scripts/02-remove-prometheus-data-init

This file was deleted.

21 changes: 0 additions & 21 deletions rootfs/etc/s6-overlay/scripts/03-remove-mlathub-up-init

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.

0 comments on commit 2584d18

Please sign in to comment.