This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to branch master
in repository osm-tile-server.

commit 138063ad1e41f982182f91099753c5f4315b5f69
Author: Ruben Undheim <ruben.undh...@gmail.com>
Date:   Fri Sep 4 00:34:56 2015 +0200

    Can do it now.
---
 debian/osm-tile-server-base.postinst | 15 ++++++++++++---
 etc/osm-tile-server.conf             |  1 +
 scripts/osm-tile-server-process      |  2 ++
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/debian/osm-tile-server-base.postinst 
b/debian/osm-tile-server-base.postinst
index b944234..6966e75 100644
--- a/debian/osm-tile-server-base.postinst
+++ b/debian/osm-tile-server-base.postinst
@@ -29,6 +29,9 @@ case "$1" in
         db_get osm-tile-server/import-sample
         IMPORTSAMPLE=$RET
         db_set osm-tile-server/import-sample false
+        db_get osm-tile-server/do_it_now
+        PROCESSNOW=$RET
+        db_set osm-tile-server/do_it_now "Later"
 
         if ! getent group $DBUSER >/dev/null; then
             addgroup --system $DBUSER >/dev/null
@@ -76,9 +79,6 @@ case "$1" in
 
         sed -i 's/\(dbname">.*CDATA\)\[[^\]*\]/\1\['${DBNAME}'\]\]/' 
/usr/share/openstreetmap-carto/style-osm-tile-server.xml
    
-        if [ "$IMPORTSAMPLE" = "true" ] ; then
-            su $DBUSER -c "osm2pgsql --slim -d $DBNAME --cache-strategy sparse 
-C 100 --hstore -S /usr/share/osm2pgsql/default.style 
/usr/share/osm-tile-server-base/samples/liechtenstein-latest.osm.pbf"
-        fi
 
         sed -i 's/^DBNAME=""/DBNAME="'${DBNAME}'"/' /etc/osm-tile-server.conf
 
@@ -89,6 +89,15 @@ case "$1" in
         
         chown $DBUSER:$DBUSER /var/cache/osm-tile-server-base
 
+
+        if [ "$IMPORTSAMPLE" = "true" ] ; then
+            su $DBUSER -c "osm2pgsql --slim -d $DBNAME --cache-strategy sparse 
-C 100 --hstore -S /usr/share/osm2pgsql/default.style 
/usr/share/osm-tile-server-base/samples/liechtenstein-latest.osm.pbf"
+        fi
+
+        if [ "$PROCESSNOW" = "Now; will take some time" ] ; then
+            osm-tile-server-process
+        fi
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/etc/osm-tile-server.conf b/etc/osm-tile-server.conf
index 5b552eb..8d1cc89 100644
--- a/etc/osm-tile-server.conf
+++ b/etc/osm-tile-server.conf
@@ -1,2 +1,3 @@
 
 DBNAME=""
+AREA=""
diff --git a/scripts/osm-tile-server-process b/scripts/osm-tile-server-process
index 4c4509d..cbd4809 100755
--- a/scripts/osm-tile-server-process
+++ b/scripts/osm-tile-server-process
@@ -1,4 +1,6 @@
 #!/bin/bash
 
+set -e
+
 osm-tile-server-download Norway
 osm-tile-server-import /var/cache/osm-tile-server-base/downloaded.osm.pbf

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/osm-tile-server.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to