Skip to content

Commit

Permalink
s6 v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Aug 27, 2023
1 parent 4ff9c73 commit cec8e2e
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 2 deletions.
1 change: 0 additions & 1 deletion linux-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ RUN curl -fsSL "https://raw.githubusercontent.com/hotio/arr-discord-notifier/${A
chmod u=rwx,go=rx "${APP_DIR}/arr-discord-notifier.sh"

COPY root/ /
RUN chmod -R +x /etc/cont-init.d/ /etc/services.d/
1 change: 0 additions & 1 deletion linux-arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ RUN curl -fsSL "https://raw.githubusercontent.com/hotio/arr-discord-notifier/${A
chmod u=rwx,go=rx "${APP_DIR}/arr-discord-notifier.sh"

COPY root/ /
RUN chmod -R +x /etc/cont-init.d/ /etc/services.d/
Empty file.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/perms/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/perms/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find /etc/s6-overlay/s6-rc.d -name "run" -execdir chmod +x {} +
Empty file.
19 changes: 19 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/secrets/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/command/with-contenv bash
# shellcheck shell=bash

find /var/run/s6/container_environment/ -type f -name 'FILE__*' -print0 | while IFS= read -r -d '' FILENAME; do
NEW_VAR=${FILENAME//FILE__/}
SECRET_FILE=$(cat "${FILENAME}")
if [[ ! -f ${SECRET_FILE} ]]; then
echo "[${NEW_VAR##*/}] The file \"${SECRET_FILE}\" wasn't found!"
exit 1
fi
SECRET=$(cat "${SECRET_FILE}")
if [[ -n ${SECRET} ]]; then
echo -n "${SECRET}" > "${NEW_VAR}"
echo "[${NEW_VAR##*/}] Set with secret from \"${SECRET_FILE}\"."
else
echo "[${NEW_VAR##*/}] No secret found in \"${SECRET_FILE}\"!"
exit 1
fi
done
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/secrets/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/secrets/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/secrets/run
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/service1/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/setup/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/setup/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/setup/run
Empty file.

0 comments on commit cec8e2e

Please sign in to comment.