feat: Store config in RAM (#559)

This commit is contained in:
Kroese
2024-01-13 20:25:57 +01:00
committed by GitHub
parent 3a507f5bf6
commit 575da1f574
7 changed files with 31 additions and 28 deletions

View File

@@ -31,17 +31,24 @@ VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1)
# Check folder
STORAGE="/storage"
[ ! -d "$STORAGE" ] && error "Storage folder ($STORAGE) not found!" && exit 13
if [ ! -d "$STORAGE" ]; then
error "Storage folder ($STORAGE) not found!" && exit 13
fi
if [ ! -d "/run/shm" ]; then
if [ -d "/dev/shm" ]; then
ln -s /dev/shm /run/shm
else
error "Folder /dev/shm not found!" && exit 14
fi
fi
# Cleanup files
rm -f /run/dsm.url
rm -f /run/qemu.*
rm -f /run/shm/qemu.*
rm -f /run/shm/dsm.url
# Cleanup dirs
rm -rf /tmp/dsm
rm -f /tmp/server.*
rm -rf "$STORAGE/tmp"
# Helper functions