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

Add rpc pipe path (#326)

* Add rpc pipe path

* Add seahub.sh env and change pipe path
This commit is contained in:
feiniks
2020-02-21 15:27:47 +08:00
committed by GitHub
parent c20b17cdbc
commit 150c90df40
5 changed files with 24 additions and 5 deletions

View File

@@ -31,11 +31,13 @@ def _load_path_from_env(key, check=True):
CCNET_CONF_PATH = _load_path_from_env('CCNET_CONF_DIR')
SEAFILE_CONF_DIR = _load_path_from_env('SEAFILE_CONF_DIR')
SEAFILE_CENTRAL_CONF_DIR = _load_path_from_env('SEAFILE_CENTRAL_CONF_DIR', check=False)
SEAFILE_RPC_PIPE_PATH = _load_path_from_env ("SEAFILE_RPC_PIPE_PATH", check=False)
ccnet_pipe_path = os.path.join (CCNET_CONF_PATH, 'ccnet-rpc.sock')
ccnet_threaded_rpc = ccnet.CcnetThreadedRpcClient(ccnet_pipe_path)
seafile_pipe_path = os.path.join(SEAFILE_CONF_DIR, 'seafile.sock')
seafile_pipe_path = os.path.join(SEAFILE_RPC_PIPE_PATH if SEAFILE_RPC_PIPE_PATH else SEAFILE_CONF_DIR,
'seafile.sock')
seafserv_threaded_rpc = seafile.ServerThreadedRpcClient(seafile_pipe_path)
# load ccnet server addr and port from ccnet.conf.