diff --git a/conf/install.exp b/conf/install.exp index fafcd4a..6074087 100644 --- a/conf/install.exp +++ b/conf/install.exp @@ -7,7 +7,7 @@ set seafile_data [lindex $argv 2] set fileserver_port [lindex $argv 3] set db_pwd [lindex $argv 4] -spawn /var/www/seafile/seafile-server-4.3.1/setup-seafile-mysql.sh +spawn /var/www/seafile/seafile-server-4.3.2/setup-seafile-mysql.sh expect "Press ENTER to continue" send "\r"; diff --git a/conf/nginx.conf b/conf/nginx.conf index 2a5efd0..ff8e931 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,6 +33,7 @@ location /seafhttp/ { client_max_body_size 0; proxy_connect_timeout 36000s; proxy_read_timeout 36000s; + proxy_send_timeout 36000s; } diff --git a/conf/upgrade_4.1.1.exp b/conf/upgrade_4.1.1.exp index d1ec85f..1603750 100644 --- a/conf/upgrade_4.1.1.exp +++ b/conf/upgrade_4.1.1.exp @@ -3,7 +3,7 @@ set timeout 5 set mysql_password [lindex $argv 0] -spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.0_4.1.sh +spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.0_4.1.sh expect "to contiune" send "\r"; diff --git a/conf/upgrade_4.2.1.exp b/conf/upgrade_4.2.1.exp index 43c58a1..afb51b1 100644 --- a/conf/upgrade_4.2.1.exp +++ b/conf/upgrade_4.2.1.exp @@ -3,7 +3,7 @@ set timeout 5 set mysql_password [lindex $argv 0] -spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.1_4.2.sh +spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.1_4.2.sh expect "to contiune" send "\r"; diff --git a/conf/upgrade_4.3.1.exp b/conf/upgrade_4.3.2.exp similarity index 60% rename from conf/upgrade_4.3.1.exp rename to conf/upgrade_4.3.2.exp index 1460173..c7d3daf 100644 --- a/conf/upgrade_4.3.1.exp +++ b/conf/upgrade_4.3.2.exp @@ -3,7 +3,7 @@ set timeout 5 set mysql_password [lindex $argv 0] -spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.2_4.3.sh +spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.2_4.3.sh expect "to contiune" send "\r"; diff --git a/scripts/install b/scripts/install index 521c7ee..2b618f7 100644 --- a/scripts/install +++ b/scripts/install @@ -9,7 +9,7 @@ is_public=$6 architecture=$7 final_path=/var/www/seafile seafile_data=/home/yunohost.app/seafile-data -seafile_version=4.3.1 +seafile_version=4.3.2 # Retrieve admin email admin_email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g") @@ -58,7 +58,7 @@ webdav_port=$port # store config in yunohost sudo yunohost app setting seafile seahub_port -v $seahub_port sudo yunohost app setting seafile fileserver_port -v $fileserver_port -sudo yunohost app setting seafile fileserver_port -v $webdav_port +sudo yunohost app setting seafile webdav_port -v $webdav_port sudo yunohost app setting seafile is_public -v $is_public sudo yunohost app setting seafile architecture -v $architecture sudo yunohost app setting seafile installed_version -v $seafile_version @@ -116,6 +116,10 @@ sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" ../conf/nginx.conf sed -i "s@WEBDAV_PORT@$webdav_port@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/seafile.conf +# Add webdav +sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf +sudo sed -i "s@WEBDAV_PORT@$webdav_port@g" $final_path/conf/seafdav.conf + # Copy first launch script sudo cp ../conf/first_launch.exp $final_path sudo chmod +x $final_path/first_launch.exp @@ -125,8 +129,8 @@ sudo chown -R www-data:www-data $final_path sudo chown -R www-data:www-data $seafile_data # Start seafile, seahub and populate admin account -sudo su - www-data -c "/var/www/seafile/seafile-server-$seafile_version/seafile.sh start" -sudo su - www-data -c "$final_path/first_launch.exp $admin_email $admin_password" +sudo su - www-data -s /bin/bash -c "/var/www/seafile/seafile-server-$seafile_version/seafile.sh start" +sudo su - www-data -s /bin/bash -c "$final_path/first_launch.exp $admin_email $admin_password" # Add sso config to unprotect domain.tld/seafhttp + domain.tld/seafdav do in /etc/ssowat/conf.json.persistent sudo cp ../conf/add_sso_conf.py $final_path @@ -143,10 +147,6 @@ else sudo yunohost app setting seafile unprotected_uris -v "/" fi -# Add webdav -sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf -sudo sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" $final_path/conf/seafdav.conf - # Add logrotate sudo cp ../conf/logrotate /etc/logrotate.d/seafile sudo sed -i "s@SEAFILE_DIR@$final_path@g" /etc/logrotate.d/seafile @@ -159,5 +159,7 @@ sudo yunohost service add seafile-server sudo service nginx reload sudo yunohost app ssowatconf -# Start seafile +# Restart seafile +sudo su - www-data -s /bin/bash -c "/var/www/seafile/seafile-server-latest/seahub.sh stop" +sudo service seafile-server stop sudo service seafile-server start \ No newline at end of file diff --git a/scripts/remove b/scripts/remove index 86a07b7..1ae1ebd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -11,6 +11,7 @@ sudo rm -rf /var/www/seafile sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf sudo rm -f /etc/init.d/seafile-server sudo rm -rf /home/yunohost.app/seafile-data +sudo rm -r /tmp/seahub_cache # Remove databases mysql -u root -p$root_pwd -e "DROP DATABASE ccnetdb ; DROP DATABASE seafiledb ; DROP DATABASE seahubdb ; DROP USER seafile@localhost ;" diff --git a/scripts/upgrade b/scripts/upgrade index 3fc1d42..3653788 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -5,7 +5,7 @@ app=seafile installed_version=$(sudo yunohost app setting $app installed_version) architecture=$(sudo yunohost app setting $app architecture) root_pwd=$(sudo cat /etc/yunohost/mysql) -seafile_version=4.3.1 +seafile_version=4.3.2 final_path=/var/www/$app # extract new version @@ -20,7 +20,7 @@ sudo service seafile-server stop # permission to execute update script and expect helper sudo chmod +x ../conf/upgrade_4.1.1.exp sudo chmod +x ../conf/upgrade_4.2.1.exp -sudo chmod +x ../conf/upgrade_4.3.1.exp +sudo chmod +x ../conf/upgrade_4.3.2.exp sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.0_4.1.sh sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.1_4.2.sh sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.2_4.3.sh @@ -31,12 +31,12 @@ case $installed_version in # Update seafile by script sudo ../conf/upgrade_4.1.1.exp $root_pwd sudo ../conf/upgrade_4.2.1.exp $root_pwd - sudo ../conf/upgrade_4.3.1.exp $root_pwd + sudo ../conf/upgrade_4.3.2.exp $root_pwd ;; "4.1."* ) # Update seafile by script sudo ../conf/upgrade_4.2.1.exp $root_pwd - sudo ../conf/upgrade_4.3.1.exp $root_pwd + sudo ../conf/upgrade_4.3.2.exp $root_pwd ;; esac @@ -59,7 +59,7 @@ then findPort 8080 webdav_port=$port - sudo yunohost app setting seafile fileserver_port -v $webdav_port + sudo yunohost app setting seafile webdav_port -v $webdav_port # Disallow port that was used by old seafile client ccnet_port=$(sudo yunohost app setting $app ccnet_port) @@ -74,7 +74,7 @@ then # Add webdav config sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf - sudo sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" $final_path/conf/seafdav.conf + sudo sed -i "s@WEBDAV_PORT@$webdav_port@g" $final_path/conf/seafdav.conf # Add sso config to unprotect domain.tld/seafdav in /etc/ssowat/conf.json.persistent sudo cp ../conf/add_sso_conf.py $final_path @@ -95,6 +95,9 @@ fi # restore correct permissions sudo chown -R www-data:www-data $final_path +# delete seafile cache +sudo rm -r /tmp/seahub_cache + # restart seafile server sudo service seafile-server start diff --git a/sources/seafile-server_4.3.1_armhf.tar b/sources/seafile-server_4.3.2_armhf.tar similarity index 68% rename from sources/seafile-server_4.3.1_armhf.tar rename to sources/seafile-server_4.3.2_armhf.tar index 853ee6c..dce9bb4 100644 Binary files a/sources/seafile-server_4.3.1_armhf.tar and b/sources/seafile-server_4.3.2_armhf.tar differ diff --git a/sources/seafile-server_4.3.1_i386.tar b/sources/seafile-server_4.3.2_i386.tar similarity index 69% rename from sources/seafile-server_4.3.1_i386.tar rename to sources/seafile-server_4.3.2_i386.tar index e4b42c2..74b0849 100644 Binary files a/sources/seafile-server_4.3.1_i386.tar and b/sources/seafile-server_4.3.2_i386.tar differ diff --git a/sources/seafile-server_4.3.1_rpi.tar b/sources/seafile-server_4.3.2_rpi.tar similarity index 69% rename from sources/seafile-server_4.3.1_rpi.tar rename to sources/seafile-server_4.3.2_rpi.tar index a25ef59..0aae7f1 100644 Binary files a/sources/seafile-server_4.3.1_rpi.tar and b/sources/seafile-server_4.3.2_rpi.tar differ diff --git a/sources/seafile-server_4.3.1_x86-64.tar b/sources/seafile-server_4.3.2_x86-64.tar similarity index 69% rename from sources/seafile-server_4.3.1_x86-64.tar rename to sources/seafile-server_4.3.2_x86-64.tar index 1c5c7c3..a97899f 100644 Binary files a/sources/seafile-server_4.3.1_x86-64.tar and b/sources/seafile-server_4.3.2_x86-64.tar differ