mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 23:38:37 +00:00
fix non nginx upgrade seafile10 (#5384)
This commit is contained in:
parent
86474c95f4
commit
bee8dc6fb1
@ -204,13 +204,15 @@ EOF
|
|||||||
function update_nginx_conf () {
|
function update_nginx_conf () {
|
||||||
nginx_conf=/etc/nginx/sites-available/seafile.conf
|
nginx_conf=/etc/nginx/sites-available/seafile.conf
|
||||||
if [[ ! -e /etc/nginx/sites-available/seafile.conf ]]; then
|
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
|
fi
|
||||||
|
|
||||||
cp ${nginx_conf} ${nginx_conf}.bak
|
if [[ -e ${nginx_conf} ]]; then
|
||||||
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}
|
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;
|
update_database;
|
||||||
migrate_avatars;
|
migrate_avatars;
|
||||||
|
|
||||||
add_notification_conf;
|
# do not auto update notification_conf
|
||||||
|
# add_notification_conf;
|
||||||
update_nginx_conf;
|
# update_nginx_conf;
|
||||||
|
|
||||||
move_old_customdir_outside;
|
move_old_customdir_outside;
|
||||||
make_media_custom_symlink;
|
make_media_custom_symlink;
|
||||||
|
Loading…
Reference in New Issue
Block a user