On 12/19/2012 06:19 AM, Svavar Kjarrval wrote:
Hi.

I was wondering what methods you use to make osm2pgsql be quiet when run
by crontab. It is very annoying to receive a everything-is-normal
message every time I run it. I run it from within a shellscript since I
need to execute other commands before and after it runs.

The others have already answered your main question, but in case your shellscript is used for minutely updates from cron, and you are interested, there is an example shell script to do this robustly at:

https://github.com/apmon/OSM-rendering-stack-deplou/blob/master/wikipedia/puppet/files/openstreetmap/load-next


Internet search resulted in a github fork[1] where somebody implemented
a quiet support but hasn't been accepted into the main distribution. I
tried the -q, --quiet and --silent parameters. I also tried to stick '>
/dev/null' and '> /dev/null 2>&1' at the end of the osm2pgsql command
within the shellscript with no effect.

The only viable solution left, it seems, is to turn off e-mails from
crontab completely. However, I do have other processes which I need to
receive error messages from, including those within the shellscript.

What would you recommend?

[1] https://github.com/openstreetmap/osm2pgsql/pull/7

- Svavar Kjarrval


_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to