1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-13 22:01:37 +00:00

Don't parse seahub secret key

This commit is contained in:
杨赫然
2024-08-29 09:52:30 +08:00
parent 4f450ea8e0
commit 915be2dc90
8 changed files with 25 additions and 87 deletions

View File

@@ -10,6 +10,7 @@ import sys
from collections import namedtuple
from contextlib import contextmanager
from os.path import abspath, basename, dirname, exists, join
import shutil
import requests
from tenacity import TryAgain, retry, stop_after_attempt, wait_fixed
@@ -24,6 +25,7 @@ logger = logging.getLogger(__name__)
class ServerCtl(object):
def __init__(self, topdir, projectdir, datadir, fileserver, db='sqlite3', seaf_server_bin='seaf-server', ccnet_server_bin='ccnet-server'):
self.db = db
self.topdir = topdir
self.datadir = datadir
self.central_conf_dir = join(datadir, 'conf')
self.seafile_conf_dir = join(datadir, 'seafile-data')
@@ -53,6 +55,9 @@ class ServerCtl(object):
os.mkdir (self.central_conf_dir, 0o755)
os.mkdir (self.seafile_conf_dir, 0o755)
os.mkdir (self.ccnet_conf_dir, 0o755)
src = join(self.projectdir, 'tests/conf/seahub_settings.py')
dst = join(self.central_conf_dir, 'seahub_settings.py')
shutil.copyfile(src, dst)
self.init_ccnet()
self.init_seafile()