Refactor custom startup script to set up shared Forge image cache and handle symlink creation
All checks were successful
Build & Push Forge-Kasm / docker (push) Successful in 28s

This commit is contained in:
2025-06-06 19:02:39 -05:00
parent a17c354486
commit 2bff3e6101

View File

@@ -9,5 +9,20 @@ if [[ -x $STARTUPDIR/maximize_window.sh ]]; then
bash $STARTUPDIR/maximize_window.sh &
fi
# Run Forge and wait for it to close
# Set up shared card image cache
SHARED_CACHE="/forge-shared-cache"
FORGE_CACHE="$HOME/.cache/forge/pics"
mkdir -p "$(dirname "$FORGE_CACHE")"
# Replace cache with symlink if needed
if [ ! -L "$FORGE_CACHE" ]; then
rm -rf "$FORGE_CACHE"
ln -s "$SHARED_CACHE" "$FORGE_CACHE"
echo "✔ Forge image cache linked to $SHARED_CACHE"
else
echo " Forge image cache already linked"
fi
# Launch Forge
exec /opt/forge/forge.sh