[Mapbender-commits] r7069 - trunk/mapbender/resources/db
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Oct 27 08:14:30 EDT 2010
Author: kmq
Date: 2010-10-27 05:14:30 -0700 (Wed, 27 Oct 2010)
New Revision: 7069
Modified:
trunk/mapbender/resources/db/install.sh
Log:
gave 6th parameter 'DBPASS' to installscript for automated installation
Modified: trunk/mapbender/resources/db/install.sh
===================================================================
--- trunk/mapbender/resources/db/install.sh 2010-10-27 10:38:05 UTC (rev 7068)
+++ trunk/mapbender/resources/db/install.sh 2010-10-27 12:14:30 UTC (rev 7069)
@@ -89,6 +89,7 @@
DBNAME=$3
DBTEMPLATE=$4
DBUSER=$5
+ DBPASS=$6
}
@@ -151,13 +152,18 @@
else
echo "Creating mapbender.conf..."
- echo -n "Please enter the password for user $DBUSER: "
+ if [ -z $DBPASS ]
+ then
+ echo -n "Please enter the password for user $DBUSER: "
+ stty -echo
+ read password
+ stty echo
+ echo ""
+ else
+ password=$DBPASS
+ fi
- stty -echo
- read password
- stty echo
- echo ""
sed -e "s/%%DBSERVER%%/$DBHOST/g" -e "s/%%DBPORT%%/$DBPORT/g" -e "s/%%DBNAME%%/$DBNAME/g" -e "s/%%DBOWNER%%/$DBUSER/g" -e "s/%%DBPASSWORD%%/$password/g" ../../conf/mapbender.conf-dist >../../conf/mapbender.conf
fi
echo ""
@@ -212,7 +218,7 @@
# we only support postgresql and utf-8
DBENCODING="UTF-8"
DBVERSION="pgsql"
-if [ $# -ne 5 ]
+if [ $# -ne 5 ] && [ $# -ne 6 ]
then
echo "Continue? (y)es or (n)o"
read disclaimer
@@ -222,22 +228,28 @@
fi
echo "get_db_config - variables have to be set"
get_db_config;
+
+ show_db_config;
+ echo "Look ok? Start Install? (y)es or (n)o"
+ read ANSWER
+ if [ $ANSWER != "y" ]
+ then
+ exec $0
+ fi
else
echo "set_db_config - variables where passed when the script was called"
set_db_config $@;
fi;
-show_db_config;
-echo "Look ok? Start Install? (y)es or (n)o"
-read ANSWER
-if [ $ANSWER != "y" ]
-then
- exec $0
-fi
+
echo "Creating Mapbender administration database"
create_pgsql_db;
update_mapbender_conf;
-set_permissions;
+
+if [ $# -ne 6]
+then
+ set_permissions;
+fi
compile_po;
echo ""
More information about the Mapbender_commits
mailing list