diff --git a/conf/upgrade_6.1.exp b/conf/upgrade_6.1.exp index cbcf505..31e527b 100644 --- a/conf/upgrade_6.1.exp +++ b/conf/upgrade_6.1.exp @@ -4,7 +4,7 @@ set timeout 5 set seafile_dir [lindex $argv 0] set mysql_password [lindex $argv 1] -spawn $seafile_dir/upgrade/upgrade_5.1_6.0.sh +spawn $seafile_dir/upgrade/upgrade_6.0_6.1.sh expect "to contiune" send "\r"; diff --git a/conf/upgrade_6.2.exp b/conf/upgrade_6.2.exp index 31e527b..3f2b0a0 100644 --- a/conf/upgrade_6.2.exp +++ b/conf/upgrade_6.2.exp @@ -4,7 +4,7 @@ set timeout 5 set seafile_dir [lindex $argv 0] set mysql_password [lindex $argv 1] -spawn $seafile_dir/upgrade/upgrade_6.0_6.1.sh +spawn $seafile_dir/upgrade/upgrade_6.1_6.2.sh expect "to contiune" send "\r"; diff --git a/scripts/_common.sh b/scripts/_common.sh index 0695733..abbf7e4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -46,6 +46,15 @@ get_configuration() { fi } +set_path_2() { + if [[ $path == '/' ]] + then + path2=$path + else + path2=$path'/' + fi +} + config_nginx() { @@ -54,7 +63,7 @@ config_nginx() { if [[ -z $seahub_port ]] || [[ -z $fileserver_port ]] then seahub_port=$(head -n 20 /etc/nginx/conf.d/$domain.d/seafile.conf | grep -E "fastcgi_pass.*127.0.0.1:" | cut -d':' -f2 | cut -d';' -f1) - fileserver_port=$(head -n 20 /etc/nginx/conf.d/$domain.d/seafile.conf | grep -E "proxy_pass.*127.0.0.1:" | cut -d':' -f3 | cut -d';' -f1 | cut -d'/' -f1) + fileserver_port=$(head -n 50 /etc/nginx/conf.d/$domain.d/seafile.conf | grep -E "proxy_pass.*127.0.0.1:" | cut -d':' -f3 | cut -d';' -f1 | cut -d'/' -f1) ynh_app_setting_set $app seahub_port $seahub_port ynh_app_setting_set $app fileserver_port $fileserver_port diff --git a/scripts/install b/scripts/install index e39dfc1..ea2fafa 100644 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,9 @@ seafile_user=www-data test $(ynh_webpath_available $domain $path) == 'True' || ynh_die "$domain$path is not available, please use an other domain or path." ynh_webpath_register $app $domain $path +# Create special path with / at the end +set_path_2 + # Check Final Path availability test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -43,14 +46,6 @@ ynh_app_setting_set $app webdav_port $webdav_port ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app installed_version $seafile_version -# Create special path with / at the end -if [[ $path == '/' ]] -then - path2=$path -else - path2=$path'/' -fi - # Download new version from sources get_source $architecture $seafile_version diff --git a/scripts/upgrade b/scripts/upgrade index cf2e52f..8447431 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,6 +24,9 @@ root_pwd=$(cat /etc/yunohost/mysql) # Get configuration for user and final path get_configuration +# Create special path with / at the end +set_path_2 + # Download new version from sources get_source $architecture $seafile_version