From a75ef1c83df664819e7747c45d00422ecb353095 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Sat, 15 May 2010 19:44:18 -0600 Subject: [PATCH] scripts for managing things --- bin/env | 7 +++++++ bin/start-app | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 bin/env create mode 100755 bin/start-app diff --git a/bin/env b/bin/env new file mode 100755 index 0000000..f87ff7a --- /dev/null +++ b/bin/env @@ -0,0 +1,7 @@ +#!/bin/bash +DOMAIN="oebfare.com" +PROJECT="oebfare_project" +ROOT="${HOME}/webapps/${DOMAIN}" +PROJECT_ROOT="${ROOT}/${PROJECT}" +SERVER_ROOT="${ROOT}/oebland" +VENV_ROOT="${HOME}/virtualenvs/${DOMAIN}" \ No newline at end of file diff --git a/bin/start-app b/bin/start-app new file mode 100755 index 0000000..70760fb --- /dev/null +++ b/bin/start-app @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +. env +GUNICORN_OPTS="--daemon --name=${DOMAIN} --pid=${SERVER_ROOT}/run/gunicorn.pid unix:${SERVER_ROOT}/run/gunicorn.sock" + +(cd $PROJECT_ROOT && $VENV_ROOT/bin/python manage.py run_gunicorn $GUNICORN_OPTS) \ No newline at end of file