Merge branch 'master' into better-extra-scripts
This commit is contained in:
commit
22b024fed5
|
@ -3,6 +3,7 @@ import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import urllib2
|
import urllib2
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
ckan_ini = os.environ.get('CKAN_INI', '/srv/app/production.ini')
|
ckan_ini = os.environ.get('CKAN_INI', '/srv/app/production.ini')
|
||||||
|
@ -85,7 +86,7 @@ def create_sysadmin():
|
||||||
command = ['paster', '--plugin=ckan', 'user', name, '-c', ckan_ini]
|
command = ['paster', '--plugin=ckan', 'user', name, '-c', ckan_ini]
|
||||||
|
|
||||||
out = subprocess.check_output(command)
|
out = subprocess.check_output(command)
|
||||||
if 'User: \nNone\n' not in out:
|
if 'User:None' not in re.sub(r'\s', '', out):
|
||||||
print '[prerun] Sysadmin user exists, skipping creation'
|
print '[prerun] Sysadmin user exists, skipping creation'
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the common uwsgi options
|
# Set the common uwsgi options
|
||||||
UWSGI_OPTS="--plugins http,python,gevent --socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L"
|
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L"
|
||||||
|
|
||||||
# Check whether http basic auth password protection is enabled and enable basicauth routing on uwsgi respecfully
|
# Check whether http basic auth password protection is enabled and enable basicauth routing on uwsgi respecfully
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
|
|
Loading…
Reference in New Issue