diff --git a/ci/serverctl.py b/ci/serverctl.py index 98f6b31a..1d18084a 100755 --- a/ci/serverctl.py +++ b/ci/serverctl.py @@ -56,8 +56,6 @@ def init_ccnet(self): self.central_conf_dir, '-c', self.ccnet_conf_dir, - '--name', - 'test', '--host', 'test.seafile.com', ] diff --git a/python/seaserv/__init__.py b/python/seaserv/__init__.py index 376fdd52..8c75d8b3 100644 --- a/python/seaserv/__init__.py +++ b/python/seaserv/__init__.py @@ -32,9 +32,9 @@ from .service import get_related_users_by_repo, get_related_users_by_org_repo from .service import post_empty_file, del_file -from .service import CCNET_CONF_PATH, CCNET_SERVER_ADDR, CCNET_SERVER_PORT, \ +from .service import CCNET_CONF_PATH, CCNET_SERVER_ADDR, \ MAX_UPLOAD_FILE_SIZE, MAX_DOWNLOAD_DIR_SIZE, FILE_SERVER_ROOT, \ - CALC_SHARE_USAGE, SERVICE_URL, FILE_SERVER_PORT, SERVER_ID, \ + CALC_SHARE_USAGE, SERVICE_URL, FILE_SERVER_PORT, \ SEAFILE_CENTRAL_CONF_DIR, LDAP_HOST from .service import send_message diff --git a/scripts/setup-seafile-mysql.py b/scripts/setup-seafile-mysql.py index c5a7f1f7..3e18f692 100644 --- a/scripts/setup-seafile-mysql.py +++ b/scripts/setup-seafile-mysql.py @@ -806,7 +806,6 @@ def generate(self): ccnet_init, '-F', env_mgr.central_config_dir, '--config-dir', self.ccnet_dir, - '--name', self.server_name, '--host', self.ip_or_domain, ] diff --git a/scripts/setup-seafile.sh b/scripts/setup-seafile.sh index 863de18e..f935f62e 100755 --- a/scripts/setup-seafile.sh +++ b/scripts/setup-seafile.sh @@ -498,7 +498,6 @@ if [[ "${use_existing_ccnet}" != "true" ]]; then if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH "${ccnet_init}" \ -F "${default_conf_dir}" \ -c "${default_ccnet_conf_dir}" \ - --name "${server_name}" \ --host "${ip_or_domain}"; then err_and_quit; fi diff --git a/tools/seafile-admin b/tools/seafile-admin index 5e3658b0..b5e199ec 100755 --- a/tools/seafile-admin +++ b/tools/seafile-admin @@ -47,11 +47,9 @@ SCRIPT_NAME = os.path.basename(sys.argv[0]) PYTHON = sys.executable conf = {} -CONF_SERVER_NAME = 'server_name' CONF_CCNET_DIR = 'ccnet_dir' CONF_SEAFILE_DIR = 'seafile_dir' CONF_SEAHUB_DIR = 'seafile_dir' -CONF_CCNET_PORT = 'ccnet_port' CONF_SEAFILE_PORT = 'seafile_port' CONF_FILESERVER_PORT = 'fileserver_port' CONF_IP_OR_DOMAIN = 'ip_or_domain' @@ -304,21 +302,6 @@ Press [ENTER] to continue print welcome_msg raw_input() - -def get_server_name(): - def validate(name): - r = re.compile(r'^[\w]{3,15}$') - return bool(r.match(name)) - - question = 'What is the name of the server?' - key = 'server name' - note = '3 - 15 letters or digits' - conf[CONF_SERVER_NAME] = ask_question(question, - key=key, - note=note, - validate=validate) - - def get_server_ip_or_domain(): def validate(s): r = r'^[^.].+\..+[^.]$' @@ -352,24 +335,6 @@ def get_ccnet_conf_dir(): conf[CONF_CCNET_DIR] = ccnet_conf_dir -def get_ccnet_port(): - def validate(s): - try: - port = int(s) - except ValueError: - return False - - return port > 0 and port < 65536 - - question = 'Which port do you want to use for the ccnet server?' - key = 'ccnet server port' - default = '10001' - conf[CONF_CCNET_PORT] = ask_question(question, - key=key, - default=default, - validate=validate) - - def get_seafile_port(): def validate(s): try: @@ -568,9 +533,7 @@ def check_python_dependencies(silent=False): def config_ccnet_seafile(): get_ccnet_conf_dir() if not conf[CONF_CCNET_CONF_EXISTS]: - get_server_name() get_server_ip_or_domain() - get_ccnet_port() get_seafile_data_dir() if not conf[CONF_SEAFILE_CONF_EXISTS]: @@ -584,11 +547,8 @@ def config_ccnet_seafile(): highlight(conf[CONF_CCNET_DIR])) else: info('ccnet conf dir: %s' % highlight(conf[CONF_CCNET_DIR])) - info('server name: %s' % - highlight(conf[CONF_SERVER_NAME])) info('server host: %s' % highlight(conf[CONF_IP_OR_DOMAIN])) - info('ccnet port: %s' % highlight(conf[CONF_CCNET_PORT])) if conf[CONF_SEAFILE_CONF_EXISTS]: info('seafile: use existing config in %s' % @@ -619,10 +579,6 @@ def init_ccnet_seafile(): conf[CONF_SEAFILE_CENTRAL_CONF_DIR], '-c', conf[CONF_CCNET_DIR], - '--name', - conf[CONF_SERVER_NAME], - '--port', - conf[CONF_CCNET_PORT], '--host', conf[CONF_IP_OR_DOMAIN], ]