From 9d2ac488cb9594e66c9ec6a84599320092745b2a Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Mon, 16 Aug 2021 15:44:07 +0300 Subject: [PATCH 1/2] Add the es_cleaner.py script to crontab and make sure that it's executable. --- setup-scripts/setup-health-check-scripts.sh | 3 +++ setup-scripts/support/crontab | 1 + 2 files changed, 4 insertions(+) diff --git a/setup-scripts/setup-health-check-scripts.sh b/setup-scripts/setup-health-check-scripts.sh index 6cac2c9e..77be25b2 100755 --- a/setup-scripts/setup-health-check-scripts.sh +++ b/setup-scripts/setup-health-check-scripts.sh @@ -9,3 +9,6 @@ pip3 install discord-webhook python-dotenv requests elasticsearch-curator # add cron entries to user crontab crontab -u user /home/user/skynet-webportal/setup-scripts/support/crontab + +# make sure the scripts are runnable +chmod +x /home/user/skynet-webportal/scripts/es_cleaner.py diff --git a/setup-scripts/support/crontab b/setup-scripts/support/crontab index 9ebdb5ae..ad766264 100644 --- a/setup-scripts/support/crontab +++ b/setup-scripts/support/crontab @@ -3,3 +3,4 @@ 0 * * * * /home/user/skynet-webportal/setup-scripts/health-checker.py /home/user/skynet-webportal/.env sia 1 30 */4 * * * /home/user/skynet-webportal/setup-scripts/blocklist-airtable.py /home/user/skynet-webportal/.env 0 4 * * * /home/user/skynet-webportal/scripts/db_backup.sh 1 >> /home/user/skynet-webportal/logs/db_backup_`date +"%Y-%m-%d-%H%M"`.log 2 > &1 +0 5 * * * /home/user/skynet-webportal/scripts/es_cleaner.py 1 http://localhost:9200 From bbdea486337ec56183aac646eb8ee885b8dc933a Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Mon, 16 Aug 2021 15:48:59 +0300 Subject: [PATCH 2/2] Just make the scripts runnable. --- scripts/es_cleaner.py | 0 scripts/portal-restart.sh | 0 setup-scripts/setup-health-check-scripts.sh | 3 --- 3 files changed, 3 deletions(-) mode change 100644 => 100755 scripts/es_cleaner.py mode change 100644 => 100755 scripts/portal-restart.sh diff --git a/scripts/es_cleaner.py b/scripts/es_cleaner.py old mode 100644 new mode 100755 diff --git a/scripts/portal-restart.sh b/scripts/portal-restart.sh old mode 100644 new mode 100755 diff --git a/setup-scripts/setup-health-check-scripts.sh b/setup-scripts/setup-health-check-scripts.sh index 77be25b2..6cac2c9e 100755 --- a/setup-scripts/setup-health-check-scripts.sh +++ b/setup-scripts/setup-health-check-scripts.sh @@ -9,6 +9,3 @@ pip3 install discord-webhook python-dotenv requests elasticsearch-curator # add cron entries to user crontab crontab -u user /home/user/skynet-webportal/setup-scripts/support/crontab - -# make sure the scripts are runnable -chmod +x /home/user/skynet-webportal/scripts/es_cleaner.py