cwctl.py
changeset 8851 0020aa12af07
parent 8829 bb14dc9848ec
child 8930 6a02be304486
equal deleted inserted replaced
8850:4032499c701e 8851:0020aa12af07
   362           'default': 'all-in-one',
   362           'default': 'all-in-one',
   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           }),
       
   368         ('no-post-create',
       
   369          {'short': 'P',
       
   370           'action': 'store_true',
       
   371           'default': False,
       
   372           'help': 'do not run post-create tasks (database creation, etc.)',
   367           }),
   373           }),
   368         )
   374         )
   369 
   375 
   370     def run(self, args):
   376     def run(self, args):
   371         """run the command with its specific arguments"""
   377         """run the command with its specific arguments"""
   431             from logilab.common.shellutils import chown
   437             from logilab.common.shellutils import chown
   432             # 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
   433             print 'set %s as owner of the data directory' % config['uid']
   439             print 'set %s as owner of the data directory' % config['uid']
   434             chown(config.appdatahome, config['uid'])
   440             chown(config.appdatahome, config['uid'])
   435         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]
   436         helper.postcreate(self.config.automatic)
   442         if not self.config.no_post_create:
       
   443             helper.postcreate(self.config.automatic)
   437 
   444 
   438     def _handle_win32(self, config, appid):
   445     def _handle_win32(self, config, appid):
   439         if sys.platform != 'win32':
   446         if sys.platform != 'win32':
   440             return
   447             return
   441         service_template = """
   448         service_template = """