#!/bin/sh set -e # Ensure /data directory exists and is writable # This handles the case where a Docker volume is mounted with root ownership if [ ! -w /data ]; then echo "Warning: /data not writable, attempting to fix permissions..." # This will only work if running as root chown -R mcp:mcp /data 2>/dev/null || true fi # Create the data directory if it doesn't exist mkdir -p /data 2>/dev/null || true exec "$@"