From b1915a9596be98854b16366d44819ec008748c4a Mon Sep 17 00:00:00 2001 From: James Sansbury Date: Wed, 11 Dec 2024 06:51:16 -0500 Subject: [PATCH] fix: respect PATH env variable for runitdir in alpine #152 (#153) --- dist/runit-init.sh | 4 ++-- templates/Dockerfile.apk.template | 2 +- templates/Dockerfile.apt.template | 2 +- templates/Dockerfile.yum.template | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/runit-init.sh b/dist/runit-init.sh index 90aa1ee..3461a7a 100755 --- a/dist/runit-init.sh +++ b/dist/runit-init.sh @@ -2,7 +2,7 @@ sv_stop() { for s in /etc/service/*; do - "$RUNITDIR"/sv stop "$s" + "$RUNITDIR"sv stop "$s" done } @@ -12,5 +12,5 @@ trap "" SIGCHLD trap "sv_stop; exit" SIGTERM -SVWAIT=60 "$RUNITDIR"/runsvdir -P /etc/service & +SVWAIT=60 "$RUNITDIR"runsvdir -P /etc/service & wait diff --git a/templates/Dockerfile.apk.template b/templates/Dockerfile.apk.template index 7c1556b..82bebae 100644 --- a/templates/Dockerfile.apk.template +++ b/templates/Dockerfile.apk.template @@ -10,7 +10,7 @@ RUN apk add --no-cache bash git openssh-client runit jq STOPSIGNAL SIGTERM -ENV RUNITDIR=/sbin +ENV RUNITDIR= COPY runit-init.sh /runit-init.sh diff --git a/templates/Dockerfile.apt.template b/templates/Dockerfile.apt.template index aa08c3c..31b4bfd 100644 --- a/templates/Dockerfile.apt.template +++ b/templates/Dockerfile.apt.template @@ -50,7 +50,7 @@ RUN apt-get clean && \ STOPSIGNAL SIGTERM -ENV RUNITDIR=/usr/bin +ENV RUNITDIR=/usr/bin/ COPY runit-init.sh /runit-init.sh diff --git a/templates/Dockerfile.yum.template b/templates/Dockerfile.yum.template index 206d138..31ab191 100644 --- a/templates/Dockerfile.yum.template +++ b/templates/Dockerfile.yum.template @@ -46,7 +46,7 @@ RUN yum clean all -y && \ STOPSIGNAL SIGTERM -ENV RUNITDIR=/usr/local/bin +ENV RUNITDIR=/usr/local/bin/ COPY runit-init.sh /runit-init.sh