From 0dcb9a8c97773b33b94d05e4b55ebddb1c968991 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 15 Sep 2015 10:51:55 +0300 Subject: install.py fixes --- install.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'install.py') diff --git a/install.py b/install.py index 0e9bbcb..ac7ceb8 100755 --- a/install.py +++ b/install.py @@ -7,8 +7,8 @@ from string import Template from subprocess import call args = {} -args['secret_key'] = os.urandom(32).encode('base-64').strip() args['hostname'] = socket.gethostname() +args['secret_key'] = os.urandom(32).encode('base-64').strip() args['install_country'] = raw_input('Country [SE]: ') or 'SE' args['install_locale'] = raw_input('Locale [sv_SE.UTF-8]: ') or 'sv_SE.UTF-8' args['install_language'] = raw_input('Language [sv]: ') or 'sv' @@ -26,8 +26,11 @@ template = Template(raw) s = template.substitute(**args) -print s +call(['createuser', args['dbuser'], '-U', 'pgsql']) +call(['createdb', args['dbname'], '-O', args['dbuser'], '-U', 'pgsql']) + +fh = open('local_settings.py', 'w') +fh.write(s) +fh.close() -#call(['createuser', 'servo', '-U', 'pgsql']) -#call(['createdb', 'servo', '-O', 'servo', '-U', 'pgsql']) -#call(['manage.py'], 'createsuperuser') +call(['./manage.py', 'createsuperuser']) -- cgit v1.2.3