diff --git a/README.md b/README.md index cd53289..a972912 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in RSS aggregator with a nice and mobile-friendly design -**Shipped version:** 1.18.1~ynh1 +**Shipped version:** 1.18.1~ynh3 **Demo:** https://demo.freshrss.org diff --git a/README_fr.md b/README_fr.md index 2a1f242..2561f87 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Agrégateur de flux RSS avec une interface adaptée au mobile -**Version incluse :** 1.18.1~ynh1 +**Version incluse :** 1.18.1~ynh3 **Démo :** https://demo.freshrss.org diff --git a/conf/freshrss.cron b/conf/freshrss.cron index d028b31..f8a5098 100644 --- a/conf/freshrss.cron +++ b/conf/freshrss.cron @@ -1 +1,2 @@ -*/10 * * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/app/actualize_script.php >/tmp/__APP__.log 2>&1 +MAILTO="root" +*/10 * * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/app/actualize_script.php >/var/www/__APP__/__APP__.log 2>&1 diff --git a/hooks/post_user_create b/hooks/post_user_create index d0060f8..b27cbec 100755 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -4,6 +4,7 @@ set -a source /usr/share/yunohost/helpers app="${0//.\/50-}" +final_path=$(ynh_app_setting_get --app=$app --key=final_path) username=$1 user_token=$(ynh_string_random) diff --git a/manifest.json b/manifest.json index 034839b..75a6d53 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "RSS aggregator with a nice and mobile-friendly design", "fr": "Agrégateur de flux RSS avec une interface adaptée au mobile" }, - "version": "1.18.1~ynh1", + "version": "1.18.1~ynh3", "url": "http://freshrss.org/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/install b/scripts/install index 794adf2..be73d6f 100755 --- a/scripts/install +++ b/scripts/install @@ -130,6 +130,7 @@ done ynh_script_progression --message="Setting up cron..." ynh_add_config --template="../conf/freshrss.cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" #================================================= @@ -145,6 +146,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_permission_create --permission="api" --url="/api" --additional_urls="/scripts/api.js" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8c6b256..7ac6a12 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,10 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --additional_urls="/scripts/api.js" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -87,7 +91,7 @@ ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" - + #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -131,8 +135,6 @@ then ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data/config.php $final_path/data/users/. $final_path/extensions/." fi - - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -143,6 +145,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Setting up cron..." ynh_add_config --template="../conf/freshrss.cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" if [ -f /tmp/FreshRSS.log ]; then