From bee8dc6fb1fe331563da8928c5b79840bab0d4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A2=E4=B9=90=E9=A9=AC?= <38058090+SkywalkerSpace@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:58:30 +0800 Subject: [PATCH] fix non nginx upgrade seafile10 (#5384) --- scripts/upgrade/upgrade_9.0_10.0.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade/upgrade_9.0_10.0.sh b/scripts/upgrade/upgrade_9.0_10.0.sh index af782a2ce0..9e46a89ef0 100755 --- a/scripts/upgrade/upgrade_9.0_10.0.sh +++ b/scripts/upgrade/upgrade_9.0_10.0.sh @@ -204,13 +204,15 @@ EOF function update_nginx_conf () { nginx_conf=/etc/nginx/sites-available/seafile.conf if [[ ! -e /etc/nginx/sites-available/seafile.conf ]]; then - nginx_conf=/shared/nginx/conf/seafile.nginx.conf + nginx_conf=/shared/nginx/conf/seafile.nginx.conf # in seafile docker fi - cp ${nginx_conf} ${nginx_conf}.bak - sed -i '/media {/i\ location /notification/ping {\n proxy_pass http://127.0.0.1:8083/ping;\n access_log /var/log/nginx/notification.access.log seafileformat;\n error_log /var/log/nginx/notification.error.log;\n }\n location /notification {\n proxy_pass http://127.0.0.1:8083/;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "upgrade";\n access_log /var/log/nginx/notification.access.log seafileformat;\n error_log /var/log/nginx/notification.error.log;\n }' ${nginx_conf} + if [[ -e ${nginx_conf} ]]; then + cp ${nginx_conf} ${nginx_conf}.bak + sed -i '/media {/i\ location /notification/ping {\n proxy_pass http://127.0.0.1:8083/ping;\n access_log /var/log/nginx/notification.access.log seafileformat;\n error_log /var/log/nginx/notification.error.log;\n }\n location /notification {\n proxy_pass http://127.0.0.1:8083/;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "upgrade";\n access_log /var/log/nginx/notification.access.log seafileformat;\n error_log /var/log/nginx/notification.error.log;\n }' ${nginx_conf} - nginx -s reload + nginx -s reload + fi } ################# @@ -224,9 +226,9 @@ ensure_server_not_running; update_database; migrate_avatars; -add_notification_conf; - -update_nginx_conf; +# do not auto update notification_conf +# add_notification_conf; +# update_nginx_conf; move_old_customdir_outside; make_media_custom_symlink;