mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix upgrade script
This commit is contained in:
parent
79fb212189
commit
7eaf3a540d
5 changed files with 18 additions and 11 deletions
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue