seafile-server: avoid error creating superuser
Make sure ccnet-server is running during the final setup step to avoid an error creating django superuser Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
This commit is contained in:
parent
65b01bb752
commit
06dbce29e3
1 changed files with 26 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
||||||
|
--- a/tools/seafile-admin
|
||||||
|
+++ b/tools/seafile-admin
|
||||||
|
@@ -831,7 +831,22 @@ def setup_seafile(args):
|
||||||
|
conf[CONF_SEAFILE_CENTRAL_CONF_DIR] = os.path.join(cwd, 'conf')
|
||||||
|
config_ccnet_seafile()
|
||||||
|
init_ccnet_seafile()
|
||||||
|
- init_seahub()
|
||||||
|
+
|
||||||
|
+ # make sure ccnet-server is running to avoid an error creating django superuser
|
||||||
|
+ if not is_running('ccnet-server'):
|
||||||
|
+ argv = [
|
||||||
|
+ 'ccnet-server',
|
||||||
|
+ '-F',
|
||||||
|
+ conf[CONF_SEAFILE_CENTRAL_CONF_DIR],
|
||||||
|
+ '-c',
|
||||||
|
+ conf[CONF_CCNET_DIR],
|
||||||
|
+ '-d'
|
||||||
|
+ ]
|
||||||
|
+ run_argv(argv)
|
||||||
|
+ init_seahub()
|
||||||
|
+ pkill('ccnet-server')
|
||||||
|
+ else:
|
||||||
|
+ init_seahub()
|
||||||
|
|
||||||
|
print
|
||||||
|
print '-----------------------------------------------------------------'
|
Loading…
Reference in a new issue