diff --git a/bin/access_logs b/bin/access_logs index 2b4fd99f..613e493f 100755 --- a/bin/access_logs +++ b/bin/access_logs @@ -4,7 +4,7 @@ set -e # Volcar y eliminar todos los access logs del día anterior date=`date +%F` -psql -h postgresql "${DATABASE:-sutty}" sutty < "/srv/http/_storage/${date}.psql.gz" +psql -h postgresql "${DATABASE:-sutty}" sutty < "/srv/_storage/${date}.psql.gz" begin; copy (select * from access_logs where created_at < '${date}') to stdout; delete from access_logs where created_at < '${date}'; diff --git a/monit.conf b/monit.conf index 6e57acc8..eabbc11e 100644 --- a/monit.conf +++ b/monit.conf @@ -5,6 +5,6 @@ check program cleanup if status != 0 then alert check program access_logs - with path "/srv/http/bin/access_logs" as uid "app" and gid "www-data" + with path "/srv/bin/access_logs" as uid "app" and gid "www-data" every "0 0 * * *" if status != 0 then alert