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
All checks were successful
Build & Push Forge-Kasm / docker (push) Successful in 28s
This commit is contained in:
@@ -9,5 +9,20 @@ if [[ -x $STARTUPDIR/maximize_window.sh ]]; then
|
|||||||
bash $STARTUPDIR/maximize_window.sh &
|
bash $STARTUPDIR/maximize_window.sh &
|
||||||
fi
|
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
|
exec /opt/forge/forge.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user