1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00
This commit is contained in:
ericgaspar 2021-06-26 15:49:23 +02:00
parent cd9414150c
commit 844d3175c8
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 33 additions and 19 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/9d3c79498368fa99cfde684c759a1c40825aaaa9.tar.gz
SOURCE_SUM=cb5a39a61f6319734606f06fafbb0eb60aa488cdc911ec84ee6738da533124cb
SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/44c5d0feba35e4533a6ee9be178bf1e7621466b6.tar.gz
SOURCE_SUM=5743118587836e4e8376386ef54debaf2866888baeddb93cc12b47040996d836
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -14,7 +14,7 @@
"email": ""
},
"requirements": {
"yunohost": ">= 4.1.7"
"yunohost": ">= 4.2.4"
},
"multi_instance": true,
"services": [

View file

@ -63,7 +63,6 @@ db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -147,9 +146,9 @@ ynh_systemd_action --service_name=$app --action="start"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --weight=1
# ynh_script_progression --message="Configuring permissions..." --weight=1
ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish"
# ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish"
#=================================================
# RELOAD NGINX

View file

@ -71,6 +71,13 @@ if [ -z "$db_name" ]; then
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
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
# Do not remove the file before the backup, to not fail the backup.
# Remove old cron job
ynh_secure_remove --file="/etc/cron.d/$app"
@ -87,23 +94,31 @@ ynh_system_user_create --username=$app --home_dir=$final_path
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
# if [ "$upgrade_type" == "UPGRADE_APP" ]
# then
# ynh_script_progression --message="Upgrading source files..." --weight=7
# # Create a temporary directory
# tmpdir="$(ynh_smart_mktemp --min_size=10)"
# # Download, check integrity, uncompress and patch the source from app.src
# ynh_setup_source --dest_dir="$tmpdir"
# # Backup the config file in the temp dir
# cp -a "$final_path/config.php" "$tmpdir/config.php"
# # Replace the old ttrss by the new one
# ynh_secure_remove --file="$final_path"
# mv "$tmpdir" "$final_path"
# ynh_secure_remove --file="$tmpdir"
# fi
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=7
# Create a temporary directory
tmpdir="$(ynh_smart_mktemp --min_size=10)"
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$tmpdir"
# Backup the config file in the temp dir
cp -a "$final_path/config.php" "$tmpdir/config.php"
# Replace the old ttrss by the new one
ynh_secure_remove --file="$final_path"
mv "$tmpdir" "$final_path"
ynh_secure_remove --file="$tmpdir"
ynh_setup_source --dest_dir="$final_path"
fi
chmod 750 "$final_path"