add findutils/remove prerun patches

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2024-03-12 16:42:32 +01:00
parent baacde631f
commit 9d81b8aaa7
3 changed files with 13 additions and 23 deletions

View File

@@ -67,11 +67,11 @@ COPY --from=zoeyvid/curl-quic:373 /usr/local/bin/curl /usr/local/bin/curl
RUN apk upgrade --no-cache -a && \ RUN apk upgrade --no-cache -a && \
apk add --no-cache ca-certificates tzdata tini \ apk add --no-cache ca-certificates tzdata tini \
patch bash nano \ bash nano \
nodejs-current \ nodejs-current \
openssl apache2-utils \ openssl apache2-utils \
lua5.1-lzlib lua5.1-socket \ lua5.1-lzlib lua5.1-socket \
coreutils grep jq shadow sudo \ coreutils grep findutils jq shadow sudo \
luarocks5.1 lua5.1-dev lua5.1-sec build-base git yarn && \ luarocks5.1 lua5.1-dev lua5.1-sec build-base git yarn && \
curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online --home /usr/local/acme.sh --nocron && \ curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online --home /usr/local/acme.sh --nocron && \
git clone https://github.com/coreruleset/coreruleset --branch "$CRS_VER" /tmp/coreruleset && \ git clone https://github.com/coreruleset/coreruleset --branch "$CRS_VER" /tmp/coreruleset && \

View File

@@ -204,11 +204,10 @@ Password: iArhP1j7p1P6TA92FA2FMbbUGYqwcYzxC4AVEe12Wbi94FY9gNN62aKyF1shrvG4NycjjX
``` ```
Immediately after logging in with this default user you will be asked to modify your details and change your password. Immediately after logging in with this default user you will be asked to modify your details and change your password.
### prerun patches/scripts (EXPERT option) - if you don't know what this is, ignore it ### prerun scripts (EXPERT option) - if you don't know what this is, ignore it
run order: entrypoint.sh (patches => scripts) => start.sh => launch.sh <br> run order: entrypoint.sh (prerun scripts) => start.sh => launch.sh <br>
if you need to apply patches before NPMplus launches put them under: `/opt/npm/etc/prerun/patches/*.patch` (applied using `patch -p1`) <br> if you need to run scripts before NPMplus launches put them under: `/opt/npm/etc/prerun/*.sh` (please add `#!/bin/sh` / `#!/bin/bash` to the top of the script) <br>
if you need to run scripts before NPMplus launches put them under: `/opt/npm/etc/prerun/scripts/*.sh` (please add `#!/bin/sh` / `#!/bin/bash` to the top of the script) <br> you need to create this folder yourself - **NOTE:** I won't help you creating thoose patches/scripts if you need them you also need to know how to create them
you need to create this folders yourself, they will be launches from the `/` folder - **NOTE:** I won't help you creating thoose patches/scripts if you need them you also need to know how to create them
## Contributing ## Contributing
All are welcome to create pull requests for this project, against the `develop` branch. All are welcome to create pull requests for this project, against the `develop` branch.

View File

@@ -1,20 +1,11 @@
#!/bin/sh #!/bin/sh
cd / || exit if [ -n "$(ls -A /data/etc/prerun 2> /dev/null)" ]; then
for script in /data/etc/prerun/*.sh; do
for patch in /data/etc/prerun/patches/*.patch; do
[ -e "$patch" ] || break
echo "Applying prerun patch using patch -p1: $patch"
patch -p1 <"$patch"
done
for script in /data/etc/prerun/scripts/*.sh; do
[ -e "$patch" ] || break
echo "Exexcuting prerun script: $script" echo "Exexcuting prerun script: $script"
chmod +x "$script" chmod +x "$script"
"$script" "$script"
done done
fi
cd /app || exit
exec start.sh exec start.sh