[osm-tile-server] 04/117: Fixing output

Ruben Undheim rubund-guest at moszumanska.debian.org
Tue Nov 3 23:18:13 UTC 2015


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 9b9b699abfb9847ef05bddc52b05ce9ce1fb29a8
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date:   Wed Sep 2 21:44:38 2015 +0000

    Fixing output
---
 debian/osm-tile-server-config.postinst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/osm-tile-server-config.postinst b/debian/osm-tile-server-config.postinst
index daccb1c..abf1968 100644
--- a/debian/osm-tile-server-config.postinst
+++ b/debian/osm-tile-server-config.postinst
@@ -41,18 +41,20 @@ case "$1" in
         fi
 
 
-        echo "Checking user:"
+        echo -n "Checking if user osm already exists... "
         set +e
         su postgres -c "cd /var/lib/postgresql ; psql postgres -tAc \"SELECT 1 FROM pg_roles WHERE rolname='osm'\"" | grep -q 1
         USEREXISTS=$?
         set -e
         if [ "$USEREXISTS" = "0" ] ; then
-            echo "User already exists"
+            echo "YES"
         else
+            echo "NO. Creating user, database and setting it up..."
             su postgres -c "cd /var/lib/postgresql ; createuser osm"
             su postgres -c "cd /var/lib/postgresql ; createdb -E UTF8 -O osm osmdb"
             su postgres -c "cd /var/lib/postgresql ; psql -c \"CREATE EXTENSION hstore;\" -d osmdb"
             su postgres -c "cd /var/lib/postgresql ; psql -c \"CREATE EXTENSION postgis;\" -d osmdb"
+            echo "DONE"
         fi
    
         

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



More information about the Pkg-grass-devel mailing list