Skip to content

Commit

Permalink
Delete ccnet.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
杨赫然 committed Nov 4, 2024
1 parent 10f450b commit 33764d6
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions ci/serverctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 33764d6

Please sign in to comment.