Don't need planet2pbf
authorMatt Amos <zerebubuth@gmail.com>
Sun, 21 Dec 2014 17:35:37 +0000 (17:35 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 22 Dec 2014 14:28:23 +0000 (14:28 +0000)
Replaced by planet-dump-ng, which generates PBFs too.

cookbooks/planet/files/default/bin/planet2pbf [deleted file]
cookbooks/planet/templates/default/cron.erb

diff --git a/cookbooks/planet/files/default/bin/planet2pbf b/cookbooks/planet/files/default/bin/planet2pbf
deleted file mode 100644 (file)
index d7003d5..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-# DO NOT EDIT - This file is being maintained by Chef
-
-set -e
-user=`whoami`
-if [ "$user" != "www-data" ];
-       then
-               echo 'Error: run as www-data'
-               exit 1
-       fi
-
-if [ -f /tmp/planet2pbf.lock ]; then
-       if [ "$(ps -p `cat /tmp/planet2pbf.lock` | wc -l)" -gt 1 ]; then
-               echo planet2pbf process is still running
-               exit 1
-       else
-               # process not running, but lock file not deleted?
-               rm /tmp/planet2pbf.lock
-       fi
-fi
-echo $$ >/tmp/planet2pbf.lock
-
-YEARFULL=`TZ=GMT+24 date +%Y`
-
-cd /store/planet/planet/
-if [ -z $1 ]
-then
-       YEAR=`TZ=GMT+24 date +%y`
-       MONTH=`TZ=GMT+24 date +%m`
-       DAY=`TZ=GMT+24 date +%d`
-       if [ -f ${YEARFULL}/planet-${YEAR}${MONTH}${DAY}.osm.bz2 -o -f ${YEARFULL}/.planet-${YEAR}${MONTH}${DAY}.osm.bz2.new ];
-       then
-               planet=planet-${YEAR}${MONTH}${DAY}.osm
-       else
-               echo Error /store/planet/planet/${YEARFULL}/planet-${YEAR}${MONTH}${DAY}.osm.bz2 not available
-               exit 1
-       fi
-else
-       planet=$1
-fi
-while [ -f ${YEARFULL}/.${planet}.bz2.new ]; 
-do 
-       echo sleeping - ${planet}.bz2
-       sleep 300
-done
-if [ -f /store/planet/planet/${YEARFULL}/${planet}.bz2 ]
-then
-       echo $planet
-       if [ -f /store/planet/pbf/${planet}.pbf ];
-       then
-               echo Error: file /store/planet/pbf/${planet}.pbf exists
-               exit 1
-       fi
-       JAVACMD_OPTIONS=-Xmx2048M
-       export JAVACMD_OPTIONS
-       pbzip2 -dc /store/planet/planet/${YEARFULL}/${planet}.bz2 | osmosis --read-xml - --buffer bufferCapacity=18000 --write-pbf /store/planet/pbf/${planet}.pbf
-       cd /store/planet/pbf/
-       md5sum ${planet}.pbf >${planet}.pbf.md5
-       ln -fs ${planet}.pbf planet-latest.osm.pbf
-       ln -fs ${planet}.pbf.md5 planet-latest.osm.pbf.md5
-else
-       echo Error no file - ${planet}.bz2
-fi
-
-rm /tmp/planet2pbf.lock
-
index 70ec98c04b243a80214be79d0ed4bf9f43df62d4..3feec3f491803146daf94d475d3b811a40577ac0 100644 (file)
@@ -1,4 +1,3 @@
 # DO NOT EDIT - This file is being maintained by Chef
 MAILTO=horntail-www-data-cron@firefishy.com
 20 */2 * * * www-data /usr/local/bin/planet-mirror-redirect-update
-39 10  * * 4 www-data /usr/local/bin/planet2pbf