mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2024-11-23 15:00:57 +07:00
fix: Use /tmp for server (#560)
This commit is contained in:
parent
575da1f574
commit
fcd7b8a825
@ -10,9 +10,9 @@ FROM qemux/qemu-host as builder
|
||||
FROM debian:trixie-slim
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG DEBCONF_NOWARNINGS="yes"
|
||||
ARG DEBIAN_FRONTEND noninteractive
|
||||
ARG DEBCONF_NONINTERACTIVE_SEEN true
|
||||
ARG DEBCONF_NOWARNINGS "yes"
|
||||
ARG DEBIAN_FRONTEND "noninteractive"
|
||||
ARG DEBCONF_NONINTERACTIVE_SEEN "true"
|
||||
|
||||
RUN if [ "$TARGETPLATFORM" != "linux/amd64" ]; then extra="qemu-user"; fi \
|
||||
&& apt-get update \
|
||||
@ -52,7 +52,7 @@ ENV RAM_SIZE "1G"
|
||||
ENV DISK_SIZE "16G"
|
||||
ENV CPU_CORES "1"
|
||||
|
||||
ARG VERSION_ARG="0.0"
|
||||
ARG VERSION_ARG "0.0"
|
||||
RUN echo "$VERSION_ARG" > /run/version
|
||||
|
||||
HEALTHCHECK --interval=60s --start-period=45s --retries=2 CMD /run/check.sh
|
||||
|
@ -44,6 +44,7 @@ if [ ! -d "/run/shm" ]; then
|
||||
fi
|
||||
|
||||
# Cleanup files
|
||||
rm -f /tmp/server.*
|
||||
rm -f /run/shm/qemu.*
|
||||
rm -f /run/shm/dsm.url
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
TMP_FILE=$(mktemp -q /run/shm/server.XXXXXX)
|
||||
TMP_FILE=$(mktemp -q /tmp/server.XXXXXX)
|
||||
|
||||
stop() {
|
||||
trap - SIGINT EXIT
|
||||
@ -35,9 +35,9 @@ if [[ "$2" != "/"* ]]; then
|
||||
|
||||
socat TCP4-LISTEN:80,reuseaddr,fork,crlf SYSTEM:"cat $TMP_FILE" 2> /dev/null &
|
||||
socat TCP4-LISTEN:"${1:-5000}",reuseaddr,fork,crlf SYSTEM:"cat $TMP_FILE" 2> /dev/null & wait $!
|
||||
|
||||
|
||||
exit
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$2" != "/run/ip.sh" ]]; then
|
||||
@ -61,6 +61,6 @@ else
|
||||
fi
|
||||
|
||||
chmod +x "$TMP_FILE"
|
||||
|
||||
|
||||
socat TCP4-LISTEN:80,reuseaddr,fork,crlf SYSTEM:"$TMP_FILE" 2> /dev/null &
|
||||
socat TCP4-LISTEN:"${1:-5000}",reuseaddr,fork,crlf SYSTEM:"$TMP_FILE" 2> /dev/null & wait $!
|
||||
|
Loading…
Reference in New Issue
Block a user