You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
749 B

  1. --- a/tools/seafile-admin
  2. +++ b/tools/seafile-admin
  3. @@ -831,7 +831,22 @@ def setup_seafile(args):
  4. conf[CONF_SEAFILE_CENTRAL_CONF_DIR] = os.path.join(cwd, 'conf')
  5. config_ccnet_seafile()
  6. init_ccnet_seafile()
  7. - init_seahub()
  8. +
  9. + # make sure ccnet-server is running to avoid an error creating django superuser
  10. + if not is_running('ccnet-server'):
  11. + argv = [
  12. + 'ccnet-server',
  13. + '-F',
  14. + conf[CONF_SEAFILE_CENTRAL_CONF_DIR],
  15. + '-c',
  16. + conf[CONF_CCNET_DIR],
  17. + '-d'
  18. + ]
  19. + run_argv(argv)
  20. + init_seahub()
  21. + pkill('ccnet-server')
  22. + else:
  23. + init_seahub()
  24. print
  25. print '-----------------------------------------------------------------'