diff --git a/.gitignore b/.gitignore index bb1b644..9a92f39 100644 --- a/.gitignore +++ b/.gitignore @@ -215,4 +215,9 @@ pip-log.txt #Mr Developer .mr.developer.cfg -.idea \ No newline at end of file +.idea + + +# From kateproject +.kateproject +.kateproject.d diff --git a/conf/first_launch.exp b/conf/first_launch.exp index 91687ea..61b6393 100644 --- a/conf/first_launch.exp +++ b/conf/first_launch.exp @@ -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"; diff --git a/conf/install.exp b/conf/install.exp index bcbc98d..bfefcc4 100644 --- a/conf/install.exp +++ b/conf/install.exp @@ -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"; diff --git a/conf/upgrade_4.1.1.exp b/conf/upgrade_4.1.1.exp index 1603750..b368f43 100644 --- a/conf/upgrade_4.1.1.exp +++ b/conf/upgrade_4.1.1.exp @@ -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"; diff --git a/conf/upgrade_4.2.1.exp b/conf/upgrade_4.2.1.exp index afb51b1..588e673 100644 --- a/conf/upgrade_4.2.1.exp +++ b/conf/upgrade_4.2.1.exp @@ -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"; diff --git a/conf/upgrade_4.3.2.exp b/conf/upgrade_4.3.2.exp index c7d3daf..4700c82 100644 --- a/conf/upgrade_4.3.2.exp +++ b/conf/upgrade_4.3.2.exp @@ -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"; diff --git a/conf/upgrade_4.4.3.exp b/conf/upgrade_4.4.3.exp index eff392c..04c1924 100644 --- a/conf/upgrade_4.4.3.exp +++ b/conf/upgrade_4.4.3.exp @@ -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"; diff --git a/conf/upgrade_5.0.3.exp b/conf/upgrade_5.0.3.exp index 370cb72..c5d4f44 100644 --- a/conf/upgrade_5.0.3.exp +++ b/conf/upgrade_5.0.3.exp @@ -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"; diff --git a/scripts/install b/scripts/install index ed4a0f1..798ca78 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 928fae5..42db24f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 diff --git a/sources/seafile-server_5.0.3_i386.tar.gz b/sources/seafile-server_5.0.3_i386.tar.gz new file mode 100644 index 0000000..601f5fe Binary files /dev/null and b/sources/seafile-server_5.0.3_i386.tar.gz differ diff --git a/sources/seafile-server_5.0.3_i386.tar.gz.REMOVED.git-id b/sources/seafile-server_5.0.3_i386.tar.gz.REMOVED.git-id deleted file mode 100644 index cc90b5b..0000000 --- a/sources/seafile-server_5.0.3_i386.tar.gz.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -601f5fefe734566c4592b46ff22f4c9ab8bcea43 \ No newline at end of file diff --git a/sources/seafile-server_5.0.3_rpi.tar.gz b/sources/seafile-server_5.0.3_rpi.tar.gz new file mode 100644 index 0000000..dc83ddf Binary files /dev/null and b/sources/seafile-server_5.0.3_rpi.tar.gz differ diff --git a/sources/seafile-server_5.0.3_rpi.tar.gz.REMOVED.git-id b/sources/seafile-server_5.0.3_rpi.tar.gz.REMOVED.git-id deleted file mode 100644 index cf853eb..0000000 --- a/sources/seafile-server_5.0.3_rpi.tar.gz.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -dc83ddf23814ca7dc5e0093ce4f3ad82ec310cbc \ No newline at end of file diff --git a/sources/seafile-server_5.0.3_x86-64.tar.gz b/sources/seafile-server_5.0.3_x86-64.tar.gz new file mode 100644 index 0000000..452bfdd Binary files /dev/null and b/sources/seafile-server_5.0.3_x86-64.tar.gz differ diff --git a/sources/seafile-server_5.0.3_x86-64.tar.gz.REMOVED.git-id b/sources/seafile-server_5.0.3_x86-64.tar.gz.REMOVED.git-id deleted file mode 100644 index a14e8e7..0000000 --- a/sources/seafile-server_5.0.3_x86-64.tar.gz.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -452bfdd255d6f1cc2e8c9ea5b26ea929090b2c51 \ No newline at end of file