cwctl.py
changeset 9001 328c24289253
parent 8930 6a02be304486
child 9002 f98d1c46ed9f
equal deleted inserted replaced
9000:506e656b7eef 9001:328c24289253
   363           'help': 'installation type, telling which part of an instance '
   363           'help': 'installation type, telling which part of an instance '
   364           'should be installed. You can list available configurations using the'
   364           'should be installed. You can list available configurations using the'
   365           ' "list" command. Default to "all-in-one", e.g. an installation '
   365           ' "list" command. Default to "all-in-one", e.g. an installation '
   366           'embedding both the RQL repository and the web server.',
   366           'embedding both the RQL repository and the web server.',
   367           }),
   367           }),
   368         ('no-post-create',
   368         ('no-db-create',
   369          {'short': 'P',
   369          {'short': 'S',
   370           'action': 'store_true',
   370           'action': 'store_true',
   371           'default': False,
   371           'default': False,
   372           'help': 'do not run post-create tasks (database creation, etc.)',
   372           'help': 'stop after creation and do not continue with db-create',
   373           }),
   373           }),
   374         )
   374         )
   375 
   375 
   376     def run(self, args):
   376     def run(self, args):
   377         """run the command with its specific arguments"""
   377         """run the command with its specific arguments"""
   437             from logilab.common.shellutils import chown
   437             from logilab.common.shellutils import chown
   438             # this directory should be owned by the uid of the server process
   438             # this directory should be owned by the uid of the server process
   439             print 'set %s as owner of the data directory' % config['uid']
   439             print 'set %s as owner of the data directory' % config['uid']
   440             chown(config.appdatahome, config['uid'])
   440             chown(config.appdatahome, config['uid'])
   441         print '\n-> creation done for %s\n' % repr(config.apphome)[1:-1]
   441         print '\n-> creation done for %s\n' % repr(config.apphome)[1:-1]
   442         if not self.config.no_post_create:
   442         if not self.config.no_db_create:
   443             helper.postcreate(self.config.automatic)
   443             helper.postcreate(self.config.automatic)
   444 
   444 
   445     def _handle_win32(self, config, appid):
   445     def _handle_win32(self, config, appid):
   446         if sys.platform != 'win32':
   446         if sys.platform != 'win32':
   447             return
   447             return