]> git.openstreetmap.org Git - nominatim.git/commitdiff
immediately exit on log rotation errors
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 26 Apr 2012 22:03:15 +0000 (00:03 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 26 Apr 2012 22:03:15 +0000 (00:03 +0200)
utils/cron_logrotate.sh

index 77102d980a66038d60663bca6780ff5a3ee08980..b9291d95323b913dcd91564a998220dbe8e9326f 100755 (executable)
@@ -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'