~doctormo/django-deployer/trunk

« back to all changes in this revision

Viewing changes to django-deploy.py

  • Committer: Martin Owens (DoctorMO)
  • Date: 2008-07-19 05:15:08 UTC
  • Revision ID: doctormo@gmail.com-20080719051508-wumlnxq5j9dr0jbt
Commit another brace of fixes to the builder and deployer

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from random import choice
6
6
import os, sys
7
7
 
 
8
interface.rootRequired()
 
9
 
8
10
if len(sys.argv) < 2:
9
11
        print "\nUse %s [www directory]\n" % sys.argv[0]
10
12
        sys.exit()
54
56
        if db['type'] == 'mysql':
55
57
                dbo = database.MySQLServer( host=db['server'], port=db['port'], username=db_user, password=db_pass, askmethod=askDBUser )
56
58
        dbo.createDatabase(str(db['name']))
 
59
        if str(db['server'])=='localhost':
 
60
                dbo.createUser(str(db['username']), str(db['password']), 'localhost')
 
61
        else:
 
62
                dbo.createUser(str(db['username']), str(db['password']), str(config['domain']))
57
63
        dbo.grantAll(str(db['name']), str(db['username']))
58
 
        dbo.createUser(str(db['username']), str(db['password']), str(config['domain']))
59
64
        dbo.commit()
60
65
 
61
66