mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix small issues
This commit is contained in:
parent
a2f13e12e8
commit
c56de31105
3 changed files with 20 additions and 11 deletions
|
@ -22,7 +22,7 @@ db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
|||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||
seafile_user=$app
|
||||
|
||||
if [[ ! "$(systemctl status seafile)" =~ "Active: inactive (dead)" ]] || [[ ! "$(systemctl status seahub)" =~ "Active: inactive (dead)" ]]; then
|
||||
if [[ ! "$(systemctl status seafile)" =~ "Active: inactive (dead)" ]] || [[ ! "$(systemctl status seahub)" =~ "Active: failed (Result: signal)" ]]; then
|
||||
ynh_print_warn --message="It's hightly recommended to make your backup when the service is stopped. Please stop seafile service and seahub service with this command before to run the backup 'systemctl stop seafile.service seahub.service'"
|
||||
fi
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ mkdir -p $final_path
|
|||
mkdir -p $final_path/installed
|
||||
mkdir -p $final_path/logs
|
||||
mkdir -p $seafile_data
|
||||
ln -s $seafile_data $final_path/seafile_data
|
||||
ln -s $seafile_data $final_path/seafile-data
|
||||
|
||||
# Create User
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
|
|
|
@ -25,6 +25,7 @@ fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
|||
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)
|
||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||
seafile_user=$app
|
||||
seafile_data=/home/yunohost.app/seafile-data
|
||||
# TODO User env variable in 4.1
|
||||
seafile_version=$(ynh_app_upstream_version)
|
||||
|
||||
|
@ -42,12 +43,13 @@ else
|
|||
ynh_systemd_action --service_name seafile --action stop
|
||||
ynh_systemd_action --service_name seahub --action stop
|
||||
fi
|
||||
sleep 2
|
||||
sleep 5
|
||||
pkill -f seafile-controller || true
|
||||
pkill -f seaf-server || true
|
||||
pkill -f ccnet-server || true
|
||||
pkill -f seahub || true
|
||||
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30
|
||||
# Backup the current version of the app
|
||||
if [ "0$(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade)" -ne 1 ]
|
||||
then
|
||||
|
@ -182,8 +184,8 @@ case $installed_version in
|
|||
ynh_secure_remove --file="$final_path/seafile-server-7.0.5"
|
||||
;&
|
||||
"7.0"* )
|
||||
# Fix file comment
|
||||
$final_path/seafile-server-$seafile_version/seahub.sh python-env seahub/manage.py migrate_file_comment
|
||||
# Fix file comment
|
||||
$final_path/seafile-server-$seafile_version/seahub.sh python-env seahub/manage.py migrate_file_comment
|
||||
|
||||
# Enable memcached
|
||||
cat >> $final_path/conf/seahub_settings.py <<EOF
|
||||
|
@ -195,8 +197,15 @@ CACHES = {
|
|||
}
|
||||
EOF
|
||||
|
||||
# Update seafile by script
|
||||
expect_scripts/upgrade_7.1.exp $final_path/seafile-server-$seafile_version
|
||||
# Update seafile by script
|
||||
expect_scripts/upgrade_7.1.exp $final_path/seafile-server-$seafile_version
|
||||
|
||||
# Fix seafile data link. Look like that the upgrade script of seafile don't always work correctly
|
||||
if [ -e $final_path/seafile-data ]; then
|
||||
old_data_dir_path="$final_path/seafile_data$(date '+%Y%m%d.%H%M%S')"
|
||||
mv "$final_path/seafile-data" "$old_data_dir_path"
|
||||
fi
|
||||
ln -s $seafile_data $final_path/seafile-data
|
||||
;&
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue