On 19/12/12 13:36, Sven Geggus wrote: > Svavar Kjarrval <[email protected]> wrote: > >> I was wondering what methods you use to make osm2pgsql be quiet when run >> by crontab. > Why calling it directly instead calling a wrapper script? I do use a wrapper script which is called from crontab. > > At least if you go for incremental updates you need to run a wrapper > script anyway because this will also involve calling osmosis. > > The relevant part of our script "replicate-loop.sh" on the german > tileserver looks like this: > > --cut-- > #!/bin/sh > ... > osm2pgsql ... >/path/to/logfile/osm2pgsql.stdout > 2>/path/to/logfile/osm2pgsql.stderr > ... > --cut-- > > Regards > > Sven > Thanks for the help. For some reason > /dev/null 2>&1 did work when I tried it this time. Don't know why it didn't work but I guess I made a mistake when trying it before. Took the advice and now the output goes to logfiles, most of it to the stderr file for some reason. At least crontab is finally quiet again.
It would be better though if osm2pgsql did implement a quiet option so we'd receive error messages via e-mail from crontab for better reaction times when errors do come up. - Svavar Kjarrval
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

