Skip to content

Commit

Permalink
Simplify startup and dependencies
Browse files Browse the repository at this point in the history
Move startup scripts to /etc/s6-overlay/startup.d
Create oneshot service named "startup" which 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
  • Loading branch information
wiedehopf committed Mar 17, 2024
1 parent 7ebc4c8 commit e946d67
Show file tree
Hide file tree
Showing 136 changed files with 20 additions and 27 deletions.
2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/01-sanity-check/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/02-tar1090-update/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/02-tar1090-update/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/04-tar1090-configure/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/04-tar1090-configure/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/06-range-outline/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/06-range-outline/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/07-ngnix-logging/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/07-ngnix-logging/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/down

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/down

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/10-telegraf-conf/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/10-telegraf-conf/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.
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.
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.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
File renamed without changes.
2 changes: 2 additions & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/startup/up
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/startup
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.
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.
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions rootfs/etc/s6-overlay/scripts/startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/command/with-contenv bash
# shellcheck shell=bash disable=SC1091,SC2076

source /scripts/common

SDIR=/etc/s6-overlay/startup.d

# exit 0 for nonexistent or empty directory
if ! [[ -d "$SDIR" ]] || [[ -z "$(ls "$SDIR")" ]]; then
exit 0
fi

for NAME in "$SDIR"/*; do
if ! s6wrap --quiet --prepend="$NAME" --timestamps --args "$NAME"; then
s6wrap --quiet --prepend=startup --timestamps --args echo Error running "$NAME"
exit 1
fi
done

0 comments on commit e946d67

Please sign in to comment.