X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=lazystarter.sh;h=0ed22fd8a00b9d3c88bf09731ee36a0ad48dd950;hb=e2212f944b113467faa7a8030c63ce75905a7bb7;hp=d3770194cd33059eab1e28e950fd3d53dfd3c30b;hpb=c16b8196631e5b1c4cbe618a9af74f5455fe861c;p=mediagoblin.git 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