-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
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
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec /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 |