From 736d7908b4f31095e7a7b92fc632b0f6fad05e83 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 01:20:45 +0200 Subject: RUBY_VERSION factorisation --- conf/cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'conf/cron') diff --git a/conf/cron b/conf/cron index 9a984a3..8bf7bdb 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ RAILS_ENV=production -@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.5/bin/bundle exec rake __USER__:media:remove_remote +@daily cd __FINAL__PATH__/live && __RBENVROOT__/shims/bundle exec rake __USER__:media:remove_remote -- cgit v1.2.3-70-g09d2 From 5f421f48d7fb69b8c8adafad48b93bbb621c6dce Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 19:20:06 +0200 Subject: Fix CRON --- conf/cron | 2 +- scripts/install | 2 -- scripts/upgrade | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'conf/cron') diff --git a/conf/cron b/conf/cron index 8bf7bdb..af98c3c 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ RAILS_ENV=production -@daily cd __FINAL__PATH__/live && __RBENVROOT__/shims/bundle exec rake __USER__:media:remove_remote +@daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove diff --git a/scripts/install b/scripts/install index 1f1a11f..32cb94e 100644 --- a/scripts/install +++ b/scripts/install @@ -230,8 +230,6 @@ ynh_secure_remove --file="$final_path/live/key.txt" ynh_script_progression --message="Setuping a cron job for removing cache..." --weight=1 ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" -ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/cron" cp -f ../conf/cron /etc/cron.d/$app #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index da0e7bb..0a19125 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -308,8 +308,6 @@ ynh_store_file_checksum --file="$config" ynh_script_progression --message="Setuping a cron job for removing cache..." --weight=1 ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" -ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/cron" cp -f ../conf/cron /etc/cron.d/$app #================================================= -- cgit v1.2.3-70-g09d2 From 1977f0fff725ff589618fffc18e861b264f46891 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 May 2020 23:57:16 +0200 Subject: Imrpove cron --- conf/cron | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'conf/cron') diff --git a/conf/cron b/conf/cron index af98c3c..1296c1b 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,4 @@ -RAILS_ENV=production @daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl status remove -- cgit v1.2.3-70-g09d2 From b4dc3908d08cb1767dbe729ea2cc8956369359c3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 22 May 2020 03:12:41 +0200 Subject: add tootctl preview_cards remove --- conf/cron | 1 + 1 file changed, 1 insertion(+) (limited to 'conf/cron') diff --git a/conf/cron b/conf/cron index 1296c1b..f3cae63 100644 --- a/conf/cron +++ b/conf/cron @@ -2,3 +2,4 @@ @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl status remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove -- cgit v1.2.3-70-g09d2 From 29c9a33cdb9f11f14083bebaa519bf7a6f762cfc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 22 May 2020 03:16:41 +0200 Subject: fix tootctl statuses remove --- conf/cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'conf/cron') diff --git a/conf/cron b/conf/cron index f3cae63..776808b 100644 --- a/conf/cron +++ b/conf/cron @@ -1,5 +1,5 @@ @daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl status remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl statuses remove @monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove -- cgit v1.2.3-70-g09d2