mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-10-30 10:42:45 +01:00
Reformat
This commit is contained in:
@@ -19,5 +19,34 @@ if [ -z "$(ls -A /drm-plugins)" ] && [ -d "/app/lib/streaming_providers/base/drm
|
||||
cp -r /app/lib/streaming_providers/base/drm/default-plugins/* /drm-plugins/
|
||||
fi
|
||||
|
||||
# IMPORTANT: Ensure routes directory exists and has required files
|
||||
# This is needed for the new split structure
|
||||
if [ ! -d "/app/routes" ]; then
|
||||
echo "ERROR: routes directory not found!"
|
||||
echo "The service has been split into modules. Make sure routes/ directory exists in /app/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify all required route files exist
|
||||
REQUIRED_ROUTES=("__init__.py" "providers.py" "streams.py" "m3u.py" "drm.py" "cache.py" "config.py" "epg.py")
|
||||
MISSING_FILES=0
|
||||
|
||||
for route in "${REQUIRED_ROUTES[@]}"; do
|
||||
if [ ! -f "/app/routes/$route" ]; then
|
||||
echo "ERROR: Missing required route file: /app/routes/$route"
|
||||
MISSING_FILES=$((MISSING_FILES + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $MISSING_FILES -gt 0 ]; then
|
||||
echo "ERROR: Missing $MISSING_FILES required route files. Service cannot start."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set Python path to include routes directory
|
||||
export PYTHONPATH="${PYTHONPATH}:/app"
|
||||
|
||||
echo "Routes directory check passed. Starting service..."
|
||||
|
||||
# Execute the main command
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user