mirror of
https://github.com/chenyme/grok2api.git
synced 2026-12-05 16:02:12 +00:00
- Removed unnecessary environment variable patterns from .gitignore. - Renamed configuration keys in config.defaults.toml for clarity (function_enabled to webui_enabled, function_key to webui_key). - Increased usage concurrency limit from 10 to 50 in AccountRefreshService. - Updated docker-compose.yml to remove default Redis URL. - Enhanced Dockerfile for better build efficiency and added health check. - Removed deprecated aiofiles dependency and updated other dependencies in pyproject.toml. - Deleted outdated readme.md file. - Improved account management logic in various modules, including state machine and refresh service. - Added support for new quota management features and improved logging for account refresh operations.
16 lines
379 B
Bash
Executable File
16 lines
379 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
|
|
DATA_DIR="${DATA_DIR:-$ROOT_DIR/data}"
|
|
LOG_DIR="${LOG_DIR:-$ROOT_DIR/logs}"
|
|
DEFAULT_CONFIG="$ROOT_DIR/config.defaults.toml"
|
|
|
|
mkdir -p "$DATA_DIR" "$LOG_DIR"
|
|
|
|
if [ ! -f "$DATA_DIR/config.toml" ]; then
|
|
cp "$DEFAULT_CONFIG" "$DATA_DIR/config.toml"
|
|
fi
|
|
|
|
chmod 600 "$DATA_DIR/config.toml" || true
|