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 b593616e43954930e63da4a0f7cae37bce549b1c
Author: Ruben Undheim <ruben.undh...@gmail.com>
Date:   Fri Sep 4 00:53:19 2015 +0200

    Check status and write status
---
 debian/osm-tile-server-base.postinst |  4 +++-
 scripts/osm-tile-server-process      | 11 +++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/osm-tile-server-base.postinst 
b/debian/osm-tile-server-base.postinst
index 4a9a769..ae08f88 100644
--- a/debian/osm-tile-server-base.postinst
+++ b/debian/osm-tile-server-base.postinst
@@ -101,11 +101,13 @@ case "$1" in
         fi
 
         if [ "$ACTIONNOW" = "true" ] ; then
-            su $DBUSER -c "echo \"\" > 
/var/cache/osm-tile-server-base/status.txt"
+            su $DBUSER -c "echo \"TODO\" > 
/var/cache/osm-tile-server-base/status.txt"
             if [ "$PROCESSNOW" = "Now; will take some time" ] ; then
                 osm-tile-server-process
                 su $DBUSER -c "echo \"DONE\" > 
/var/cache/osm-tile-server-base/status.txt"
             fi
+        else
+            su $DBUSER -c "echo \"\" > 
/var/cache/osm-tile-server-base/status.txt"
         fi
 
     ;;
diff --git a/scripts/osm-tile-server-process b/scripts/osm-tile-server-process
index cbd4809..9562330 100755
--- a/scripts/osm-tile-server-process
+++ b/scripts/osm-tile-server-process
@@ -2,5 +2,12 @@
 
 set -e
 
-osm-tile-server-download Norway
-osm-tile-server-import /var/cache/osm-tile-server-base/downloaded.osm.pbf
+set +e
+cat /var/cache/osm-tile-server-base/status.txt | grep -q TODO
+RET=$?
+set -e
+if [ "$RET" = "0" ] ; then
+    osm-tile-server-download Norway
+    osm-tile-server-import /var/cache/osm-tile-server-base/downloaded.osm.pbf
+    osm-tile-server-status done
+fi

-- 
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