21 lines
No EOL
522 B
Bash
Executable file
21 lines
No EOL
522 B
Bash
Executable file
#!/bin/bash
|
|
set -exc
|
|
|
|
# check if the startup command has been provided
|
|
if [ "$1" == "" ]; then
|
|
echo "Startup command not set. Exiting"
|
|
exit;
|
|
fi
|
|
|
|
# check if the $DJANGO_SETTINGS_MODULE environment variable has been set
|
|
if [ "$DJANGO_SETTINGS_MODULE" == "" ]; then
|
|
echo "Environment variable 'DJANGO_SETTINGS_MODULE' not set. Exiting."
|
|
exit;
|
|
else
|
|
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
|
|
fi
|
|
|
|
/deploy.sh
|
|
|
|
echo "Enviroment is correct and deploy.sh has been run - executing command: '$@'"
|
|
exec "$@" && exit 0 |