diff --git a/conf/upgrade_5.0.3.exp b/conf/upgrade_5.0.3.exp new file mode 100644 index 0000000..370cb72 --- /dev/null +++ b/conf/upgrade_5.0.3.exp @@ -0,0 +1,11 @@ +#!/usr/bin/expect +set timeout 5 + +set mysql_password [lindex $argv 0] + +spawn /var/www/seafile/seafile-server-5.0.3/upgrade/upgrade_4.4_5.0.sh + +expect "to contiune" +send "\r"; + +interact \ No newline at end of file diff --git a/scripts/install b/scripts/install index 7834551..a7acbaa 100644 --- a/scripts/install +++ b/scripts/install @@ -12,7 +12,7 @@ is_public=$6 architecture=$7 final_path=/var/www/$app seafile_data=/home/yunohost.app/seafile-data -seafile_version=4.4.3 +seafile_version=5.0.3 # Retrieve admin email admin_email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g") @@ -78,29 +78,29 @@ 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 # Update seafile config -sudo sed -i "s@http://@https://@g" $final_path/ccnet/ccnet.conf -sudo sed -i "s@:8000@$path@g" $final_path/ccnet/ccnet.conf -echo 'FILE_SERVER_ROOT = "https://'$domain'/seafhttp"' | sudo tee -a $final_path/seahub_settings.py -echo 'SITE_ROOT = "'$path'/"' | sudo tee -a $final_path/seahub_settings.py -echo 'SERVE_STATIC = False' | sudo tee -a $final_path/seahub_settings.py -echo 'MEDIA_URL = "'$path'/media/"' | sudo tee -a $final_path/seahub_settings.py -echo 'COMPRESS_URL = MEDIA_URL' | sudo tee -a $final_path/seahub_settings.py -echo "STATIC_URL = MEDIA_URL + 'assets/'" | sudo tee -a $final_path/seahub_settings.py +sudo sed -i "s@http://@https://@g" $final_path/conf/ccnet.conf +sudo sed -i "s@:8000@$path@g" $final_path/conf/ccnet.conf +echo 'FILE_SERVER_ROOT = "https://'$domain'/seafhttp"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'SITE_ROOT = "'$path'/"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'SERVE_STATIC = False' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'MEDIA_URL = "'$path'/media/"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'COMPRESS_URL = MEDIA_URL' | sudo tee -a $final_path/conf/seahub_settings.py +echo "STATIC_URL = MEDIA_URL + 'assets/'" | sudo tee -a $final_path/conf/seahub_settings.py # Email configuration -echo 'EMAIL_USE_TLS = False' | sudo tee -a $final_path/seahub_settings.py -echo 'EMAIL_HOST = "localhost"' | sudo tee -a $final_path/seahub_settings.py -echo 'EMAIL_HOST_USER = "seafile@'$domain'"' | sudo tee -a $final_path/seahub_settings.py -echo 'EMAIL_HOST_PASSWORD = ""' | sudo tee -a $final_path/seahub_settings.py -echo 'EMAIL_PORT = "25"' | sudo tee -a $final_path/seahub_settings.py -echo 'DEFAULT_FROM_EMAIL = "seafile@'$domain'"' | sudo tee -a $final_path/seahub_settings.py -echo 'SERVER_EMAIL = "seafile@'$domain'"' | sudo tee -a $final_path/seahub_settings.py +echo 'EMAIL_USE_TLS = False' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'EMAIL_HOST = "localhost"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'EMAIL_HOST_USER = "seafile@'$domain'"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'EMAIL_HOST_PASSWORD = ""' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'EMAIL_PORT = "25"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'DEFAULT_FROM_EMAIL = "seafile@'$domain'"' | sudo tee -a $final_path/conf/seahub_settings.py +echo 'SERVER_EMAIL = "seafile@'$domain'"' | sudo tee -a $final_path/conf/seahub_settings.py # LDAP configuration -echo '[LDAP]' | sudo tee -a $final_path/ccnet/ccnet.conf -echo 'HOST = ldap://localhost:389' | sudo tee -a $final_path/ccnet/ccnet.conf -echo 'BASE = ou=users,dc=yunohost,dc=org' | sudo tee -a $final_path/ccnet/ccnet.conf -echo 'LOGIN_ATTR = mail' | sudo tee -a $final_path/ccnet/ccnet.conf +echo '[LDAP]' | sudo tee -a $final_path/conf/ccnet.conf +echo 'HOST = ldap://localhost:389' | sudo tee -a $final_path/conf/ccnet.conf +echo 'BASE = ou=users,dc=yunohost,dc=org' | sudo tee -a $final_path/conf/ccnet.conf +echo 'LOGIN_ATTR = mail' | sudo tee -a $final_path/conf/ccnet.conf # Add Seafile Server to startup sudo cp ../conf/seafile-server /etc/init.d diff --git a/sources/seafile-server_4.4.3_rpi.tar b/sources/seafile-server_5.0.3_i386.tar.gz similarity index 68% rename from sources/seafile-server_4.4.3_rpi.tar rename to sources/seafile-server_5.0.3_i386.tar.gz index 38803ad..601f5fe 100644 Binary files a/sources/seafile-server_4.4.3_rpi.tar and b/sources/seafile-server_5.0.3_i386.tar.gz differ diff --git a/sources/seafile-server_4.4.3_i386.tar b/sources/seafile-server_5.0.3_rpi.tar.gz similarity index 67% rename from sources/seafile-server_4.4.3_i386.tar rename to sources/seafile-server_5.0.3_rpi.tar.gz index 6a24a05..dc83ddf 100644 Binary files a/sources/seafile-server_4.4.3_i386.tar and b/sources/seafile-server_5.0.3_rpi.tar.gz differ diff --git a/sources/seafile-server_4.4.3_x86-64.tar b/sources/seafile-server_5.0.3_x86-64.tar.gz similarity index 69% rename from sources/seafile-server_4.4.3_x86-64.tar rename to sources/seafile-server_5.0.3_x86-64.tar.gz index c2866ea..452bfdd 100644 Binary files a/sources/seafile-server_4.4.3_x86-64.tar and b/sources/seafile-server_5.0.3_x86-64.tar.gz differ