mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix bug with expect scripts
This commit is contained in:
parent
be32ffb163
commit
4826866c07
10 changed files with 46 additions and 29 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -215,4 +215,9 @@ pip-log.txt
|
|||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
.idea
|
||||
.idea
|
||||
|
||||
|
||||
# From kateproject
|
||||
.kateproject
|
||||
.kateproject.d
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 10
|
||||
|
||||
set admin_email [lindex $argv 0]
|
||||
set admin_password [lindex $argv 1]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set admin_email [lindex $argv 1]
|
||||
set admin_password [lindex $argv 2]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-latest/seahub.sh start-fastcgi
|
||||
spawn $seafile_dir/seahub.sh start-fastcgi
|
||||
|
||||
expect "for the admin account?"
|
||||
send "$admin_email\r";
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 10
|
||||
|
||||
set server_name [lindex $argv 0]
|
||||
set domain [lindex $argv 1]
|
||||
set seafile_data [lindex $argv 2]
|
||||
set fileserver_port [lindex $argv 3]
|
||||
set db_pwd [lindex $argv 4]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set server_name [lindex $argv 1]
|
||||
set domain [lindex $argv 2]
|
||||
set seafile_data [lindex $argv 3]
|
||||
set fileserver_port [lindex $argv 4]
|
||||
set db_pwd [lindex $argv 5]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-5.0.3/setup-seafile-mysql.sh
|
||||
spawn $seafile_dir/setup-seafile-mysql.sh
|
||||
|
||||
expect "Press ENTER to continue"
|
||||
send "\r";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set mysql_password [lindex $argv 0]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.0_4.1.sh
|
||||
spawn $seafile_dir/upgrade/upgrade_4.0_4.1.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set mysql_password [lindex $argv 0]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.1_4.2.sh
|
||||
spawn $seafile_dir/upgrade/upgrade_4.1_4.2.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set mysql_password [lindex $argv 0]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.2_4.3.sh
|
||||
spawn $seafile_dir/upgrade/upgrade_4.2_4.3.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set mysql_password [lindex $argv 0]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-4.4.3/upgrade/upgrade_4.3_4.4.sh
|
||||
spawn $seafile_dir/upgrade/upgrade_4.3_4.4.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/expect
|
||||
set timeout 5
|
||||
|
||||
set mysql_password [lindex $argv 0]
|
||||
set seafile_dir [lindex $argv 0]
|
||||
set mysql_password [lindex $argv 1]
|
||||
|
||||
spawn /var/www/seafile/seafile-server-5.0.3/upgrade/upgrade_4.4_5.0.sh
|
||||
spawn $seafile_dir/upgrade/upgrade_4.4_5.0.sh
|
||||
|
||||
expect "to contiune"
|
||||
send "\r";
|
||||
|
|
|
@ -76,7 +76,7 @@ sudo yunohost app setting seafile db_pwd -v $db_pwd
|
|||
# Run install script
|
||||
sudo chmod +x ../conf/install.exp
|
||||
sudo chmod +x $final_path/seafile-server-$seafile_version/setup-seafile-mysql.sh
|
||||
sudo ../conf/install.exp $server_name $domain $seafile_data $fileserver_port $db_pwd
|
||||
sudo ../conf/install.exp $final_path/seafile-server-$seafile_version $server_name $domain $seafile_data $fileserver_port $db_pwd
|
||||
|
||||
# Update seafile config
|
||||
sudo sed -i "s@http://@https://@g" $final_path/conf/ccnet.conf
|
||||
|
@ -132,7 +132,7 @@ sudo chown -R www-data:www-data $seafile_data
|
|||
|
||||
# Start seafile, seahub and populate admin account
|
||||
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"
|
||||
sudo su - www-data -s /bin/bash -c "$final_path/first_launch.exp $final_path/seafile-server-$seafile_version $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
|
||||
|
|
|
@ -34,22 +34,27 @@ sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.4_5.
|
|||
case $installed_version in
|
||||
"4.0."* )
|
||||
# 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.2.exp $root_pwd
|
||||
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
|
||||
;;
|
||||
"4.1."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_4.2.1.exp $root_pwd
|
||||
sudo ../conf/upgrade_4.3.2.exp $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
|
||||
;;
|
||||
"4.3."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_4.4.3.exp $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
|
||||
;;
|
||||
"4.4."* )
|
||||
# Update seafile by script
|
||||
sudo ../conf/upgrade_5.0.3.exp $root_pwd
|
||||
sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue