mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Move expect script in scripts directory
This commit is contained in:
parent
8f9e40f596
commit
c5ad1563bd
15 changed files with 33 additions and 22 deletions
|
@ -3,7 +3,6 @@ set timeout 10
|
|||
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set admin_email [lindex $argv 1]
|
||||
set admin_password [lindex $argv 2]
|
||||
|
||||
spawn $seafile_dir/seahub.sh start-fastcgi
|
||||
|
12
scripts/expect_scripts/upgrade_6.3.exp
Normal file
12
scripts/expect_scripts/upgrade_6.3.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/upgrade_6.2_6.3.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
||||
interact
|
|
@ -88,9 +88,9 @@ ynh_mysql_create_db seahubdb "$dbuser" "$db_pwd"
|
|||
ynh_system_user_create $seafile_user $final_path
|
||||
|
||||
# Run install script
|
||||
chmod +x ../conf/install.exp
|
||||
chmod +x expect_scripts/install.exp
|
||||
chmod +x $final_path/seafile-server-$seafile_version/setup-seafile-mysql.sh
|
||||
../conf/install.exp "$final_path/seafile-server-$seafile_version" "$server_name" "$domain" "$seafile_data" "$fileserver_port" "$db_pwd"
|
||||
expect_scripts/install.exp "$final_path/seafile-server-$seafile_version" "$server_name" "$domain" "$seafile_data" "$fileserver_port" "$db_pwd"
|
||||
|
||||
# Update seafile config
|
||||
ynh_replace_string http:// https:// $final_path/conf/ccnet.conf
|
||||
|
@ -142,7 +142,7 @@ update-rc.d seafile-server defaults
|
|||
config_nginx
|
||||
|
||||
# Copy first launch script
|
||||
cp ../conf/first_launch.exp $final_path
|
||||
cp expect_scripts/first_launch.exp $final_path
|
||||
chmod +x $final_path/first_launch.exp
|
||||
|
||||
# Set permissions to seafile directory
|
||||
|
|
|
@ -46,8 +46,8 @@ test -e $final_path/seafile-server-$seafile_version && ynh_secure_remove "$final
|
|||
install_source
|
||||
|
||||
# permission to execute update script and expect helper
|
||||
chmod +x ../conf/upgrade_*.exp
|
||||
chmod +x ../conf/minor-upgrade.exp
|
||||
chmod +x expect_scripts/upgrade_*.exp
|
||||
chmod +x expect_scripts/minor-upgrade.exp
|
||||
chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_*.sh
|
||||
chmod +x $final_path/seafile-server-$seafile_version/upgrade/minor-upgrade.sh
|
||||
|
||||
|
@ -55,52 +55,52 @@ chmod +x $final_path/seafile-server-$seafile_version/upgrade/minor-upgrade.sh
|
|||
case $installed_version in
|
||||
"4.0."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_4.1.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_4.1.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"4.1."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"4.3."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"4.4."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"5.0."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"5.1."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"6.0."* )
|
||||
python3 ../conf/update_sso_conf.py || true
|
||||
install_dependance
|
||||
|
||||
# Update seafile by script
|
||||
../conf/upgrade_6.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_6.1.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
|
||||
# Enable manually wiki
|
||||
echo 'ENABLE_WIKI = True' | tee -a $final_path/conf/seahub_settings.py
|
||||
;&
|
||||
"6.1."* )
|
||||
# Update seafile by script
|
||||
../conf/upgrade_6.2.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/upgrade_6.2.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;&
|
||||
"6.2."* )
|
||||
# Update seafile by script
|
||||
expect_scripts/upgrade_6.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
|
||||
# Update logrotate to have the last version
|
||||
ynh_use_logrotate $final_path/logs --non-append
|
||||
;&
|
||||
# "6.2."* )
|
||||
# # Update seafile by script
|
||||
# ../conf/upgrade_6.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
#
|
||||
# # Update logrotate to have the last version
|
||||
# ynh_use_logrotate $final_path/logs --non-append
|
||||
# ;&
|
||||
esac
|
||||
|
||||
../conf/minor-upgrade.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
expect_scripts/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."* ]]
|
||||
|
|
Loading…
Reference in a new issue