mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
parent
86de26ec2d
commit
6e232e7a26
16 changed files with 30 additions and 23 deletions
|
@ -7,7 +7,7 @@ set seafile_data [lindex $argv 2]
|
||||||
set fileserver_port [lindex $argv 3]
|
set fileserver_port [lindex $argv 3]
|
||||||
set db_pwd [lindex $argv 4]
|
set db_pwd [lindex $argv 4]
|
||||||
|
|
||||||
spawn /var/www/seafile/seafile-server-4.3.1/setup-seafile-mysql.sh
|
spawn /var/www/seafile/seafile-server-4.3.2/setup-seafile-mysql.sh
|
||||||
|
|
||||||
expect "Press ENTER to continue"
|
expect "Press ENTER to continue"
|
||||||
send "\r";
|
send "\r";
|
||||||
|
|
|
@ -33,6 +33,7 @@ location /seafhttp/ {
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
proxy_connect_timeout 36000s;
|
proxy_connect_timeout 36000s;
|
||||||
proxy_read_timeout 36000s;
|
proxy_read_timeout 36000s;
|
||||||
|
proxy_send_timeout 36000s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ set timeout 5
|
||||||
|
|
||||||
set mysql_password [lindex $argv 0]
|
set mysql_password [lindex $argv 0]
|
||||||
|
|
||||||
spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.0_4.1.sh
|
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.0_4.1.sh
|
||||||
|
|
||||||
expect "to contiune"
|
expect "to contiune"
|
||||||
send "\r";
|
send "\r";
|
||||||
|
|
|
@ -3,7 +3,7 @@ set timeout 5
|
||||||
|
|
||||||
set mysql_password [lindex $argv 0]
|
set mysql_password [lindex $argv 0]
|
||||||
|
|
||||||
spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.1_4.2.sh
|
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.1_4.2.sh
|
||||||
|
|
||||||
expect "to contiune"
|
expect "to contiune"
|
||||||
send "\r";
|
send "\r";
|
||||||
|
|
|
@ -3,7 +3,7 @@ set timeout 5
|
||||||
|
|
||||||
set mysql_password [lindex $argv 0]
|
set mysql_password [lindex $argv 0]
|
||||||
|
|
||||||
spawn /var/www/seafile/seafile-server-4.3.1/upgrade/upgrade_4.2_4.3.sh
|
spawn /var/www/seafile/seafile-server-4.3.2/upgrade/upgrade_4.2_4.3.sh
|
||||||
|
|
||||||
expect "to contiune"
|
expect "to contiune"
|
||||||
send "\r";
|
send "\r";
|
|
@ -9,7 +9,7 @@ is_public=$6
|
||||||
architecture=$7
|
architecture=$7
|
||||||
final_path=/var/www/seafile
|
final_path=/var/www/seafile
|
||||||
seafile_data=/home/yunohost.app/seafile-data
|
seafile_data=/home/yunohost.app/seafile-data
|
||||||
seafile_version=4.3.1
|
seafile_version=4.3.2
|
||||||
|
|
||||||
# Retrieve admin email
|
# Retrieve admin email
|
||||||
admin_email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
|
admin_email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
|
||||||
|
@ -58,7 +58,7 @@ webdav_port=$port
|
||||||
# store config in yunohost
|
# store config in yunohost
|
||||||
sudo yunohost app setting seafile seahub_port -v $seahub_port
|
sudo yunohost app setting seafile seahub_port -v $seahub_port
|
||||||
sudo yunohost app setting seafile fileserver_port -v $fileserver_port
|
sudo yunohost app setting seafile fileserver_port -v $fileserver_port
|
||||||
sudo yunohost app setting seafile fileserver_port -v $webdav_port
|
sudo yunohost app setting seafile webdav_port -v $webdav_port
|
||||||
sudo yunohost app setting seafile is_public -v $is_public
|
sudo yunohost app setting seafile is_public -v $is_public
|
||||||
sudo yunohost app setting seafile architecture -v $architecture
|
sudo yunohost app setting seafile architecture -v $architecture
|
||||||
sudo yunohost app setting seafile installed_version -v $seafile_version
|
sudo yunohost app setting seafile installed_version -v $seafile_version
|
||||||
|
@ -116,6 +116,10 @@ sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" ../conf/nginx.conf
|
||||||
sed -i "s@WEBDAV_PORT@$webdav_port@g" ../conf/nginx.conf
|
sed -i "s@WEBDAV_PORT@$webdav_port@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/seafile.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/seafile.conf
|
||||||
|
|
||||||
|
# Add webdav
|
||||||
|
sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf
|
||||||
|
sudo sed -i "s@WEBDAV_PORT@$webdav_port@g" $final_path/conf/seafdav.conf
|
||||||
|
|
||||||
# Copy first launch script
|
# Copy first launch script
|
||||||
sudo cp ../conf/first_launch.exp $final_path
|
sudo cp ../conf/first_launch.exp $final_path
|
||||||
sudo chmod +x $final_path/first_launch.exp
|
sudo chmod +x $final_path/first_launch.exp
|
||||||
|
@ -125,8 +129,8 @@ sudo chown -R www-data:www-data $final_path
|
||||||
sudo chown -R www-data:www-data $seafile_data
|
sudo chown -R www-data:www-data $seafile_data
|
||||||
|
|
||||||
# Start seafile, seahub and populate admin account
|
# Start seafile, seahub and populate admin account
|
||||||
sudo su - www-data -c "/var/www/seafile/seafile-server-$seafile_version/seafile.sh start"
|
sudo su - www-data -s /bin/bash -c "/var/www/seafile/seafile-server-$seafile_version/seafile.sh start"
|
||||||
sudo su - www-data -c "$final_path/first_launch.exp $admin_email $admin_password"
|
sudo su - www-data -s /bin/bash -c "$final_path/first_launch.exp $admin_email $admin_password"
|
||||||
|
|
||||||
# Add sso config to unprotect domain.tld/seafhttp + domain.tld/seafdav do in /etc/ssowat/conf.json.persistent
|
# 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
|
sudo cp ../conf/add_sso_conf.py $final_path
|
||||||
|
@ -143,10 +147,6 @@ else
|
||||||
sudo yunohost app setting seafile unprotected_uris -v "/"
|
sudo yunohost app setting seafile unprotected_uris -v "/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add webdav
|
|
||||||
sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf
|
|
||||||
sudo sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" $final_path/conf/seafdav.conf
|
|
||||||
|
|
||||||
# Add logrotate
|
# Add logrotate
|
||||||
sudo cp ../conf/logrotate /etc/logrotate.d/seafile
|
sudo cp ../conf/logrotate /etc/logrotate.d/seafile
|
||||||
sudo sed -i "s@SEAFILE_DIR@$final_path@g" /etc/logrotate.d/seafile
|
sudo sed -i "s@SEAFILE_DIR@$final_path@g" /etc/logrotate.d/seafile
|
||||||
|
@ -159,5 +159,7 @@ sudo yunohost service add seafile-server
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
||||||
|
|
||||||
# Start seafile
|
# Restart seafile
|
||||||
|
sudo su - www-data -s /bin/bash -c "/var/www/seafile/seafile-server-latest/seahub.sh stop"
|
||||||
|
sudo service seafile-server stop
|
||||||
sudo service seafile-server start
|
sudo service seafile-server start
|
|
@ -11,6 +11,7 @@ sudo rm -rf /var/www/seafile
|
||||||
sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf
|
sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf
|
||||||
sudo rm -f /etc/init.d/seafile-server
|
sudo rm -f /etc/init.d/seafile-server
|
||||||
sudo rm -rf /home/yunohost.app/seafile-data
|
sudo rm -rf /home/yunohost.app/seafile-data
|
||||||
|
sudo rm -r /tmp/seahub_cache
|
||||||
|
|
||||||
# Remove databases
|
# Remove databases
|
||||||
mysql -u root -p$root_pwd -e "DROP DATABASE ccnetdb ; DROP DATABASE seafiledb ; DROP DATABASE seahubdb ; DROP USER seafile@localhost ;"
|
mysql -u root -p$root_pwd -e "DROP DATABASE ccnetdb ; DROP DATABASE seafiledb ; DROP DATABASE seahubdb ; DROP USER seafile@localhost ;"
|
||||||
|
|
|
@ -5,7 +5,7 @@ app=seafile
|
||||||
installed_version=$(sudo yunohost app setting $app installed_version)
|
installed_version=$(sudo yunohost app setting $app installed_version)
|
||||||
architecture=$(sudo yunohost app setting $app architecture)
|
architecture=$(sudo yunohost app setting $app architecture)
|
||||||
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
||||||
seafile_version=4.3.1
|
seafile_version=4.3.2
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
|
|
||||||
# extract new version
|
# extract new version
|
||||||
|
@ -20,7 +20,7 @@ sudo service seafile-server stop
|
||||||
# permission to execute update script and expect helper
|
# permission to execute update script and expect helper
|
||||||
sudo chmod +x ../conf/upgrade_4.1.1.exp
|
sudo chmod +x ../conf/upgrade_4.1.1.exp
|
||||||
sudo chmod +x ../conf/upgrade_4.2.1.exp
|
sudo chmod +x ../conf/upgrade_4.2.1.exp
|
||||||
sudo chmod +x ../conf/upgrade_4.3.1.exp
|
sudo chmod +x ../conf/upgrade_4.3.2.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.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.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.2_4.3.sh
|
||||||
|
@ -31,12 +31,12 @@ case $installed_version in
|
||||||
# Update seafile by script
|
# Update seafile by script
|
||||||
sudo ../conf/upgrade_4.1.1.exp $root_pwd
|
sudo ../conf/upgrade_4.1.1.exp $root_pwd
|
||||||
sudo ../conf/upgrade_4.2.1.exp $root_pwd
|
sudo ../conf/upgrade_4.2.1.exp $root_pwd
|
||||||
sudo ../conf/upgrade_4.3.1.exp $root_pwd
|
sudo ../conf/upgrade_4.3.2.exp $root_pwd
|
||||||
;;
|
;;
|
||||||
"4.1."* )
|
"4.1."* )
|
||||||
# Update seafile by script
|
# Update seafile by script
|
||||||
sudo ../conf/upgrade_4.2.1.exp $root_pwd
|
sudo ../conf/upgrade_4.2.1.exp $root_pwd
|
||||||
sudo ../conf/upgrade_4.3.1.exp $root_pwd
|
sudo ../conf/upgrade_4.3.2.exp $root_pwd
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ then
|
||||||
|
|
||||||
findPort 8080
|
findPort 8080
|
||||||
webdav_port=$port
|
webdav_port=$port
|
||||||
sudo yunohost app setting seafile fileserver_port -v $webdav_port
|
sudo yunohost app setting seafile webdav_port -v $webdav_port
|
||||||
|
|
||||||
# Disallow port that was used by old seafile client
|
# Disallow port that was used by old seafile client
|
||||||
ccnet_port=$(sudo yunohost app setting $app ccnet_port)
|
ccnet_port=$(sudo yunohost app setting $app ccnet_port)
|
||||||
|
@ -74,7 +74,7 @@ then
|
||||||
|
|
||||||
# Add webdav config
|
# Add webdav config
|
||||||
sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf
|
sudo cp ../conf/seafdav.conf $final_path/conf/seafdav.conf
|
||||||
sudo sed -i "s@SEAFILE_FILESERVER_PORT@$fileserver_port@g" $final_path/conf/seafdav.conf
|
sudo sed -i "s@WEBDAV_PORT@$webdav_port@g" $final_path/conf/seafdav.conf
|
||||||
|
|
||||||
# Add sso config to unprotect domain.tld/seafdav in /etc/ssowat/conf.json.persistent
|
# Add sso config to unprotect domain.tld/seafdav in /etc/ssowat/conf.json.persistent
|
||||||
sudo cp ../conf/add_sso_conf.py $final_path
|
sudo cp ../conf/add_sso_conf.py $final_path
|
||||||
|
@ -95,6 +95,9 @@ fi
|
||||||
# restore correct permissions
|
# restore correct permissions
|
||||||
sudo chown -R www-data:www-data $final_path
|
sudo chown -R www-data:www-data $final_path
|
||||||
|
|
||||||
|
# delete seafile cache
|
||||||
|
sudo rm -r /tmp/seahub_cache
|
||||||
|
|
||||||
# restart seafile server
|
# restart seafile server
|
||||||
sudo service seafile-server start
|
sudo service seafile-server start
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
853ee6cf178bacfa9d622412b39e546f4f744598
|
|
|
@ -1 +0,0 @@
|
||||||
e4b42c28cb47854133a11a240c01dd438dc5a692
|
|
|
@ -1 +0,0 @@
|
||||||
a25ef5979ac70874f5771e229ad409e6c60b4a4c
|
|
|
@ -1 +0,0 @@
|
||||||
1c5c7c34d4cf2b28fad7aaf27453223a47cc17a3
|
|
1
sources/seafile-server_4.3.2_armhf.tar.REMOVED.git-id
Normal file
1
sources/seafile-server_4.3.2_armhf.tar.REMOVED.git-id
Normal file
|
@ -0,0 +1 @@
|
||||||
|
dce9bb444d0d0d24228013ed9182c07835e7b1bf
|
1
sources/seafile-server_4.3.2_i386.tar.REMOVED.git-id
Normal file
1
sources/seafile-server_4.3.2_i386.tar.REMOVED.git-id
Normal file
|
@ -0,0 +1 @@
|
||||||
|
74b0849ab352875cb660ef8faa91a291fa41a9a6
|
1
sources/seafile-server_4.3.2_rpi.tar.REMOVED.git-id
Normal file
1
sources/seafile-server_4.3.2_rpi.tar.REMOVED.git-id
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0aae7f1b9a19a98c469da89f395d9c353b5fa050
|
1
sources/seafile-server_4.3.2_x86-64.tar.REMOVED.git-id
Normal file
1
sources/seafile-server_4.3.2_x86-64.tar.REMOVED.git-id
Normal file
|
@ -0,0 +1 @@
|
||||||
|
a97899f393f9bd2a6e35859d0594569bc7f2c40f
|
Loading…
Reference in a new issue