forked from 0x2620/pandora
init scripts and name
This commit is contained in:
parent
1f2b52fe29
commit
ac23b43e9f
6 changed files with 75 additions and 1 deletions
14
etc/init/pandora-backgroundtasks.conf
Normal file
14
etc/init/pandora-backgroundtasks.conf
Normal file
|
@ -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
|
||||
|
14
etc/init/pandora-encoder.conf
Normal file
14
etc/init/pandora-encoder.conf
Normal file
|
@ -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
|
||||
|
21
pandora/bin/pandora-backgroundtasks
Executable file
21
pandora/bin/pandora-backgroundtasks
Executable file
|
@ -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'])
|
||||
|
21
pandora/bin/pandora-encoder
Executable file
21
pandora/bin/pandora-encoder
Executable file
|
@ -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'])
|
||||
|
4
pandora/oxuser/templates/contact_email.txt
Normal file
4
pandora/oxuser/templates/contact_email.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Hi {{sitename}} admin,
|
||||
|
||||
someone sent you a message:
|
||||
{{message}}
|
|
@ -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__), '..')))
|
||||
|
||||
|
|
Loading…
Reference in a new issue