From 2931f8b8ffdba1bf6a91dc2c7f2c03076ee01552 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Wed, 27 Jan 2021 02:36:40 +0100 Subject: [PATCH] deactivate socat, link runtime folder to shared volume not working, media link creation deactivated --- seafile-server/scripts/bootstrap.py | 4 ++-- seafile-server/scripts/create_data_links.sh | 5 +++++ seafile-server/scripts/start.sh | 2 +- seafile-server/scripts/upgrade.py | 2 +- seahub/scripts/create_data_links.sh | 6 +++++- seahub/scripts/start.sh | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/seafile-server/scripts/bootstrap.py b/seafile-server/scripts/bootstrap.py index 4b00c56..2b15e23 100644 --- a/seafile-server/scripts/bootstrap.py +++ b/seafile-server/scripts/bootstrap.py @@ -45,8 +45,8 @@ def init_seafile_server(): # sysbol link unlink after docker finish. latest_version_dir='/opt/seafile/seafile-server-latest' current_version_dir='/opt/seafile/' + get_conf('SEAFILE_SERVER', 'seafile-server') + '-' + read_version_stamp() - if not exists(latest_version_dir): - call('ln -sf ' + current_version_dir + ' ' + latest_version_dir) + #if not exists(latest_version_dir): + #call('ln -sf ' + current_version_dir + ' ' + latest_version_dir) loginfo('Skip running setup-seafile-mysql.py because there is existing seafile-data folder.') return diff --git a/seafile-server/scripts/create_data_links.sh b/seafile-server/scripts/create_data_links.sh index 1346dd3..c09b127 100644 --- a/seafile-server/scripts/create_data_links.sh +++ b/seafile-server/scripts/create_data_links.sh @@ -43,3 +43,8 @@ fi if [[ -e /shared/logs/var-log ]]; then rm -rf /shared/logs/var-log fi + +mkdir -p /shared/runtime +ln -sf /opt/seafile/seafile-server-8.0.2 /opt/seafile/seafile-server-latest +rm -rf /opt/seafile/seafile-server-latest/runtime +ln -sf /shared/runtime /opt/seafile/seafile-server-latest/runtime diff --git a/seafile-server/scripts/start.sh b/seafile-server/scripts/start.sh index 606b149..c7c3876 100644 --- a/seafile-server/scripts/start.sh +++ b/seafile-server/scripts/start.sh @@ -21,7 +21,7 @@ function start_socat { echo "Waiting for SeaRPC socket..." sleep 1 done - socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever + #socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever } function stop_socat { diff --git a/seafile-server/scripts/upgrade.py b/seafile-server/scripts/upgrade.py index d19cca0..835402a 100644 --- a/seafile-server/scripts/upgrade.py +++ b/seafile-server/scripts/upgrade.py @@ -166,7 +166,7 @@ def check_upgrade(): current_version = os.environ['SEAFILE_VERSION'] if last_version == current_version: - fix_media_symlinks(current_version) + #fix_media_symlinks(current_version) return elif is_minor_upgrade(last_version, current_version): run_minor_upgrade(current_version) diff --git a/seahub/scripts/create_data_links.sh b/seahub/scripts/create_data_links.sh index 7566b65..0e0c2a3 100644 --- a/seahub/scripts/create_data_links.sh +++ b/seahub/scripts/create_data_links.sh @@ -39,4 +39,8 @@ if [[ ! -e /shared/seafile/conf/seahub.conf ]]; then fi rm -f /opt/seafile/seafile-server-latest/runtime/seahub.conf -ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf \ No newline at end of file +ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf + +mkdir -p /shared/runtime +rm -rf /opt/seafile/seafile-server-latest/runtime +ln -sf /shared/runtime /opt/seafile/seafile-server-latest/runtime diff --git a/seahub/scripts/start.sh b/seahub/scripts/start.sh index c643868..c313b6e 100644 --- a/seahub/scripts/start.sh +++ b/seahub/scripts/start.sh @@ -3,7 +3,7 @@ /scripts/create_data_links.sh mkdir -p /opt/seafile/seafile-server-latest/runtime -socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2 & +#socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2 & python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000