aboutsummaryrefslogtreecommitdiffstats
path: root/install.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-09-15 10:51:55 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-09-15 10:51:55 +0300
commit0dcb9a8c97773b33b94d05e4b55ebddb1c968991 (patch)
tree6c5649523eb4f7952c20dd9aaa2b449d164a7588 /install.py
parent46619ea770fe8da1b6a9e8e233cb81adcebefb3a (diff)
downloadServo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.tar.gz
Servo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.tar.bz2
Servo-0dcb9a8c97773b33b94d05e4b55ebddb1c968991.zip
install.py fixes
Diffstat (limited to 'install.py')
-rwxr-xr-xinstall.py13
1 files changed, 8 insertions, 5 deletions
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'])