From a58c0c01ded0afcb79e8db989fbd775a619c6ded Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 Aug 2021 09:41:06 +0200 Subject: [PATCH] Fix --- check_process | 12 +++--------- manifest.json | 8 ++++---- scripts/install | 12 +++++++----- scripts/upgrade | 15 +++++++++------ 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/check_process b/check_process index 3c46ac3..1f698ae 100755 --- a/check_process +++ b/check_process @@ -1,13 +1,8 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) - database="1" (STRING) + domain="domain.tld" + admin="john" + database="1" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -19,7 +14,6 @@ #upgrade=1 from_commit= backup_restore=1 multi_instance=1 - port_already_use=0 change_url=0 ;;; Options Email= diff --git a/manifest.json b/manifest.json index 55eb103..0da2013 100755 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "osada", "name": "osada", "description": { - "en": "Osada is a decentralized publication platform and social network.", - "fr": "Osada est une plateforme de publication décentralisée et un réseau social." + "en": "Decentralized publication platform and social network", + "fr": "Plateforme de publication décentralisée et un réseau social" }, "url": "http://zotlabs.com/osada/", "license": "MIT", @@ -15,12 +15,12 @@ }, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql", "postgresql" ], "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.2.0" }, "multi_instance": true, "arguments": { diff --git a/scripts/install b/scripts/install index 2d7bb74..b1a1bdd 100755 --- a/scripts/install +++ b/scripts/install @@ -213,12 +213,14 @@ ynh_add_fpm_config --package="$extra_php_dependencies" ynh_script_progression --message="Set right for Osada..." chown -R $app: $final_path +#================================================= +# SET CRON JOB +#================================================= + # Set up cron job -ynh_script_progression --message="Setting up cron job..." -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/poller-cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/poller-cron" -ynh_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file="../conf/poller-cron" -cp ../conf/poller-cron /etc/cron.d/$app +ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # STORE THE CONFIG FILE CHECKSUM diff --git a/scripts/upgrade b/scripts/upgrade index 9d03e17..6c41776 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -192,18 +192,21 @@ ynh_script_progression --message="Upgrading logrotate configuration..." # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append +#================================================= # UPGRADE FAIL2BAN #================================================= ynh_script_progression --message="Re-configure Fail2Ban..." ynh_add_fail2ban_config --logpath="$final_path/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP .*$" --max_retry="5" -# Set cron job -ynh_print_info "Setting up cron job..." -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/poller-cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/poller-cron" -ynh_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file="../conf/poller-cron" -cp -f ../conf/poller-cron /etc/cron.d/$app +#================================================= +# UPGRADE CRON JOB +#================================================= + +# Set up cron job +ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # UPGRADE DEPENDENCIES