From 4fc51b25725c564da7443b46c6a445f6ba6967f1 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:30:58 +0200 Subject: [PATCH] be closer to mastodon_ynh --- conf/cron | 2 ++ manifest.toml | 2 +- scripts/install | 4 ++-- scripts/upgrade | 4 +++- tests.toml | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/conf/cron b/conf/cron index eb881cb..02b2a6a 100644 --- a/conf/cron +++ b/conf/cron @@ -1,3 +1,5 @@ +# This is a system cron file, see crontab(5) +# m h dom mon dow user command @daily __APP__ cd __INSTALL_DIR__/live && __YNH_RUBY_LOAD_PATH__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl media remove @monthly __APP__ cd __INSTALL_DIR__/live && __YNH_RUBY_LOAD_PATH__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl media remove-orphans @monthly __APP__ cd __INSTALL_DIR__/live && __YNH_RUBY_LOAD_PATH__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl accounts cull diff --git a/manifest.toml b/manifest.toml index c6cf1ce..3f86d31 100644 --- a/manifest.toml +++ b/manifest.toml @@ -45,7 +45,7 @@ ram.runtime = "1G" [install.language] ask.en = "Choose the application language" ask.fr = "Choisissez la langue de l'application" - type = "string" + type = "select" choices = ["en_EN", "fr_FR"] default = "fr_FR" diff --git a/scripts/install b/scripts/install index a8f593c..66c18a2 100644 --- a/scripts/install +++ b/scripts/install @@ -11,7 +11,7 @@ source ynh_install_ruby__2 source ynh_add_swap source /usr/share/yunohost/helpers -admin_mail=$(ynh_user_get_info $admin 'mail') +admin_mail=$(ynh_user_get_info --username=$admin --key=mail) # Initialize config_panel settings :< max_toot_chars="500" @@ -197,4 +197,4 @@ ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=/ # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --weight=1 +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/upgrade b/scripts/upgrade index 7773093..9241311 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,10 +7,12 @@ #================================================= source _common.sh +source ynh_install_ruby__2 +source ynh_add_swap source /usr/share/yunohost/helpers -config="$install_dir/live/.env.production" upgrade_type=$(ynh_check_app_version_changed) +config="$install_dir/live/.env.production" #================================================= # STANDARD UPGRADE STEPS diff --git a/tests.toml b/tests.toml index 1d77b27..19c9c1f 100644 --- a/tests.toml +++ b/tests.toml @@ -6,7 +6,7 @@ test_format = 1.0 # Tests to run # ------------ - exclude = ["install.subdir", "install.nourl", "install.multi", "change_url"] + exclude = ["install.multi", "change_url"] # The test IDs to be used in only/exclude statements are: install.root, install.subdir, install.nourl, install.multi, backup_restore, upgrade, upgrade.someCommitId change_url # NB: you should NOT need this except if you really have a good reason...