mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
Fix
This commit is contained in:
parent
939fb57699
commit
3a53d7b007
2 changed files with 31 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/FreshRSS/FreshRSS/archive/1.18.0.tar.gz
|
SOURCE_URL=https://github.com/FreshRSS/FreshRSS/archive/1.18.1.tar.gz
|
||||||
SOURCE_SUM=41698e8b1417a12440a8c4d7cc2c9ea40a581f2ad89475ded7d372a87b6b7120
|
SOURCE_SUM=162b0be7bdc0e51022061c895b46e7a8f229588d530b196f06ddd8d9aaaf248a
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -57,6 +57,13 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -95,8 +102,8 @@ ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
# into tmp dir
|
# into tmp dir
|
||||||
tmp_path=$(mktemp -d)
|
# tmp_path=$(mktemp -d)
|
||||||
ynh_setup_source "$tmp_path"
|
# ynh_setup_source "$tmp_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -118,21 +125,29 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#old version cleanup
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
if [ -f $final_path/data/user.php.dist ]; then
|
then
|
||||||
ynh_secure_remove $final_path/data/user.php.dist
|
ynh_script_progression --message="Upgrading source files..." --time --weight=1
|
||||||
|
|
||||||
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data/config.php $final_path/data/users/. $final_path/extensions/."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#restore config
|
# #old version cleanup
|
||||||
ynh_secure_remove $tmp_path/data/do-install.txt
|
# if [ -f $final_path/data/user.php.dist ]; then
|
||||||
cp $final_path/data/config.php $tmp_path/data/config.php
|
# ynh_secure_remove $final_path/data/user.php.dist
|
||||||
cp -r $final_path/data/users/. $tmp_path/data/users/
|
# fi
|
||||||
cp -r $final_path/extensions/. $tmp_path/extensions/
|
|
||||||
|
|
||||||
# Set permissions to freshrss directory
|
# #restore config
|
||||||
# Clean up existing files and copy new files to the right place
|
# ynh_secure_remove $tmp_path/data/do-install.txt
|
||||||
ynh_secure_remove "$final_path"
|
# cp $final_path/data/config.php $tmp_path/data/config.php
|
||||||
cp -rp "$tmp_path" "$final_path"
|
# cp -r $final_path/data/users/. $tmp_path/data/users/
|
||||||
|
# cp -r $final_path/extensions/. $tmp_path/extensions/
|
||||||
|
|
||||||
|
# # Set permissions to freshrss directory
|
||||||
|
# # Clean up existing files and copy new files to the right place
|
||||||
|
# ynh_secure_remove "$final_path"
|
||||||
|
# cp -rp "$tmp_path" "$final_path"
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue