diff --git a/etc/init/pandora-backgroundtasks.conf b/etc/init/pandora-backgroundtasks.conf new file mode 100644 index 0000000..cc2955d --- /dev/null +++ b/etc/init/pandora-backgroundtasks.conf @@ -0,0 +1,14 @@ +# pandora background server +# + +description "pandora background server" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +chdir /srv/pandora/pandora + +exec /bin/su pandora -s /usr/bin/python2.6 /srv/pandora/pandora/bin/pandora-backgroundtasks + diff --git a/etc/init/pandora-encoder.conf b/etc/init/pandora-encoder.conf new file mode 100644 index 0000000..61d2ccd --- /dev/null +++ b/etc/init/pandora-encoder.conf @@ -0,0 +1,14 @@ +# pandora background server +# + +description "pandora background server" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +chdir /srv/pandora/pandora + +exec /bin/su pandora -s /usr/bin/python2.6 /srv/pandora/pandora/bin/pandora-encoder + diff --git a/pandora/bin/pandora-backgroundtasks b/pandora/bin/pandora-backgroundtasks new file mode 100755 index 0000000..2041410 --- /dev/null +++ b/pandora/bin/pandora-backgroundtasks @@ -0,0 +1,21 @@ +#!/usr/bin/python +import os +import sys +import site + +project_module = 'pandora' + +root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))) + +#using virtualenv's activate_this.py to reorder sys.path +activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') +execfile(activate_this, dict(__file__=activate_this)) + +sys.path.append(root_dir) +sys.path.append(os.path.join(root_dir, project_module)) + +from django.core.management import execute_manager + +import settings +execute_manager(settings, ['backgroundtasks', 'backgroundtasks']) + diff --git a/pandora/bin/pandora-encoder b/pandora/bin/pandora-encoder new file mode 100755 index 0000000..efd91dc --- /dev/null +++ b/pandora/bin/pandora-encoder @@ -0,0 +1,21 @@ +#!/usr/bin/python +import os +import sys +import site + +project_module = 'pandora' + +root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))) + +#using virtualenv's activate_this.py to reorder sys.path +activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') +execfile(activate_this, dict(__file__=activate_this)) + +sys.path.append(root_dir) +sys.path.append(os.path.join(root_dir, project_module)) + +from django.core.management import execute_manager + +import settings +execute_manager(settings, ['pandora-encoder', 'encoder']) + diff --git a/pandora/oxuser/templates/contact_email.txt b/pandora/oxuser/templates/contact_email.txt new file mode 100644 index 0000000..43243d0 --- /dev/null +++ b/pandora/oxuser/templates/contact_email.txt @@ -0,0 +1,4 @@ +Hi {{sitename}} admin, + +someone sent you a message: +{{message}} diff --git a/wsgi/django.wsgi b/wsgi/django.wsgi index 0a06636..3ab73e0 100644 --- a/wsgi/django.wsgi +++ b/wsgi/django.wsgi @@ -3,7 +3,7 @@ import os import sys import site -project_module = 'oxdb' +project_module = 'pandora' root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))