X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/bcd2a4a7c5d18d3c95967f9ac3e046260fab7c15..12c1deeb8a313873af7c33c878f48a819305b483:/utils/cron_logrotate.sh?ds=sidebyside diff --git a/utils/cron_logrotate.sh b/utils/cron_logrotate.sh index 77102d98..b9291d95 100755 --- a/utils/cron_logrotate.sh +++ b/utils/cron_logrotate.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -e # # Rotate query logs. @@ -8,7 +8,7 @@ basedir=`dirname $0` logfile=`date "+$basedir/../log/query-%F.log.gz"` # dump the old logfile -pg_dump -a -F p -t backup_query_log $dbname | gzip -9 > $logfile || exit +pg_dump -a -F p -t backup_query_log $dbname | gzip -9 > $logfile # remove the old logs psql -q -d $dbname -c 'DROP TABLE backup_query_log'