diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-09-15 10:51:55 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-09-15 10:51:55 +0300 |
commit | 0dcb9a8c97773b33b94d05e4b55ebddb1c968991 (patch) | |
tree | 6c5649523eb4f7952c20dd9aaa2b449d164a7588 | |
parent | 46619ea770fe8da1b6a9e8e233cb81adcebefb3a (diff) | |
download | Servo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.tar.gz Servo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.tar.bz2 Servo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.zip |
install.py fixes
-rwxr-xr-x | install.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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']) |