aboutsummaryrefslogtreecommitdiffstats
path: root/lazystarter.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lazystarter.sh')
-rwxr-xr-xlazystarter.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/lazystarter.sh b/lazystarter.sh
index d3770194..0ed22fd8 100755
--- a/lazystarter.sh
+++ b/lazystarter.sh
@@ -18,9 +18,10 @@
selfname=$(basename "$0")
local_bin="./bin"
+
case "$selfname" in
lazyserver.sh)
- starter_cmd=paster
+ starter_cmd=paster;
ini_prefix=paste
;;
lazycelery.sh)
@@ -67,16 +68,26 @@ else
exit 1
fi
+# If the user somehow doesn't have a mediagoblin.ini
+# (maybe they aren't using make) give them one
+# ... this doesn't fulfill all conditions maybe, but is a stopgap
+# that doesn't have noticable race conditions
+if [ -f mediagoblin.example.ini ] && \
+ [ ! -f mediagoblin.ini ]; then
+ echo "No mediagoblin.ini found, making one";
+ cp --no-clobber mediagoblin.example.ini mediagoblin.ini;
+fi
+
set -x
export CELERY_ALWAYS_EAGER=true
case "$selfname" in
lazyserver.sh)
- $starter serve "$ini_file" "$@" --reload
+ $starter serve "$ini_file" "$@" --reload;
;;
lazycelery.sh)
MEDIAGOBLIN_CONFIG="${ini_file}" \
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery \
- $starter "$@"
+ $starter -B "$@"
;;
*) exit 1 ;;
esac