fix: Shared memory path (#378)

This commit is contained in:
Kroese 2024-01-23 03:22:40 +01:00 committed by GitHub
parent cc952a81c1
commit 4a0dbc6c06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 10 deletions

View file

@ -60,9 +60,9 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then
if [[ "$TPM" == [Yy1]* ]]; then
mkdir -p /dev/shm/tpm
chmod 755 /dev/shm/tpm
swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2
mkdir -p /run/shm/tpm
chmod 755 /run/shm/tpm
swtpm socket -t -d --tpmstate dir=/run/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2
for (( i = 1; i < 50; i++ )); do

View file

@ -16,8 +16,10 @@ ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OP
ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ')
if [[ "${DISPLAY,,}" == "web" ]]; then
rm -f /dev/shm/msg.html
rm -f /dev/shm/index.html
[ ! -f "$INFO" ] && error "File $INFO not found?!"
rm -f "$INFO"
[ ! -f "$PAGE" ] && error "File $PAGE not found?!"
rm -f "$PAGE"
else
if [[ "${DISPLAY,,}" == "vnc" ]]; then
html "You can now connect to VNC on port 5900." "0"

View file

@ -28,8 +28,8 @@ echo
# Helper variables
STORAGE="/storage"
INFO="/dev/shm/msg.html"
PAGE="/dev/shm/index.html"
INFO="/run/shm/msg.html"
PAGE="/run/shm/index.html"
TEMPLATE="/var/www/index.html"
FOOTER1="$APP for Docker v$(</run/version)"
FOOTER2="<a href='$SUPPORT'>$SUPPORT</a>"
@ -113,7 +113,7 @@ addPackage () {
}
# Start webserver
cp -r /var/www/* /dev/shm
cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."
nginx -e stderr

View file

@ -27,9 +27,9 @@ server {
location / {
root /dev/shm;
root /run/shm;
if ( -f /dev/shm/index.html) {
if ( -f /run/shm/index.html) {
break;
}