mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
parent
2dfe5ab33a
commit
d498be179b
2 changed files with 26 additions and 39 deletions
12
conf/minor-upgrade.exp
Normal file
12
conf/minor-upgrade.exp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn $seafile_dir/upgrade/minor-upgrade.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
||||
interact
|
|
@ -29,66 +29,41 @@ sudo mv seafile-server-$seafile_version/* $final_path/seafile-server-$seafile_ve
|
|||
sudo mv '/tmp/seafile_src.tar.gz' $final_path/installed/seafile-server_${seafile_version}.tar.gz
|
||||
|
||||
# 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.2.exp
|
||||
sudo chmod +x ../conf/upgrade_4.4.3.exp
|
||||
sudo chmod +x ../conf/upgrade_5.0.3.exp
|
||||
sudo chmod +x ../conf/upgrade_5.1.exp
|
||||
sudo chmod +x ../conf/upgrade_6.0.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
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.3_4.4.sh
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.4_5.0.sh
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_5.0_5.1.sh
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_5.1_6.0.sh
|
||||
# do the upgrade
|
||||
sudo chmod +x ../conf/upgrade_*.exp
|
||||
sudo chmod +x ../conf/minor-upgrade.exp
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_*.sh
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/minor-upgrade.sh
|
||||
|
||||
# do the upgrade ( the ";&" syntax mean when it go in the frist cas how are true it do the next case)
|
||||
case $installed_version in
|
||||
"4.0."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_4.1.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_4.3.2.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
"4.1."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_4.3.2.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
"4.3."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
"4.4."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
"5.0."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
"5.1."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
;&
|
||||
esac
|
||||
|
||||
sudo ../conf/minor-upgrade.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
|
||||
## Install webdav and logrotate if not installed
|
||||
if [[ $installed_version = "4.0."* ]] || [[ $installed_version = "4.1."* ]]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue