From 33764d66348222317efa4edda528adf60278b53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=B5=AB=E7=84=B6?= Date: Mon, 4 Nov 2024 16:02:59 +0800 Subject: [PATCH] Delete ccnet.conf --- ci/serverctl.py | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/ci/serverctl.py b/ci/serverctl.py index 007f57ea..51d33fa8 100755 --- a/ci/serverctl.py +++ b/ci/serverctl.py @@ -55,40 +55,8 @@ def setup(self): os.mkdir (self.seafile_conf_dir, 0o755) os.mkdir (self.ccnet_conf_dir, 0o755) - self.init_ccnet() self.init_seafile() - def init_ccnet(self): - if self.db == 'mysql': - self.add_ccnet_db_conf() - else: - self.add_ccnet_sqlite_db_conf() - - def add_ccnet_sqlite_db_conf(self): - ccnet_conf = join(self.central_conf_dir, 'ccnet.conf') - ccnet_db_conf = '''\ -[Database] -''' - with open(ccnet_conf, 'a+') as fp: - fp.write('\n') - fp.write(ccnet_db_conf) - - def add_ccnet_db_conf(self): - ccnet_conf = join(self.central_conf_dir, 'ccnet.conf') - ccnet_db_conf = '''\ -[Database] -ENGINE = mysql -HOST = 127.0.0.1 -PORT = 3306 -USER = seafile -PASSWD = seafile -DB = ccnet -CONNECTION_CHARSET = utf8 -''' - with open(ccnet_conf, 'a+') as fp: - fp.write('\n') - fp.write(ccnet_db_conf) - def init_seafile(self): seafile_conf = join(self.central_conf_dir, 'seafile.conf') if self.fileserver == 'go_fileserver': @@ -130,6 +98,7 @@ def add_seafile_db_conf(self): user = seafile password = seafile db_name = seafile +ccnet_db_name = ccnet connection_charset = utf8 ''' with open(seafile_conf, 'a+') as fp: