#!/bin/bash set -ex if [ "$1" == "" ]; then echo "Startup command not set. Exiting" exit; fi /deploy.sh if [ "$1" == "granian" ]; then granian --version echo "Appending static files path to granian command (requires granian >= 2.3.0)" STATIC_ROOT=$(python -c 'import os; import pkmntrade_club; from django.conf import settings; print(settings.STATIC_ROOT)') set -- "$@" --static-path-mount "$STATIC_ROOT" fi echo "Environment is correct - executing command: '$@'" exec "$@"