[Mapbender-commits] r4231 - branches/2.6/resources/db

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jun 25 08:45:57 EDT 2009


Author: Darndt
Date: 2009-06-25 08:45:56 -0400 (Thu, 25 Jun 2009)
New Revision: 4231

Modified:
   branches/2.6/resources/db/install_2.6.sh
Log:
rework on install script

Modified: branches/2.6/resources/db/install_2.6.sh
===================================================================
--- branches/2.6/resources/db/install_2.6.sh	2009-06-25 12:04:19 UTC (rev 4230)
+++ branches/2.6/resources/db/install_2.6.sh	2009-06-25 12:45:56 UTC (rev 4231)
@@ -6,15 +6,15 @@
 # Disclaimer
 echo ""
 echo "DISCLAIMER: this Mapbender database setup script is not stable. USE AT YOUR OWN RISK!"
-echo "The script will create a database for you and will import the Mapbender datat to the new database"
+echo "The script will create a database for you and will import the Mapbender data to the new database"
 echo "It will also compile the Mapbender.mo files"
 echo ""
 echo "To run this script you have to set the following options"
-echo " * set the right to execute on this install script"
-echo " * set the right to execute on mapbender/tools/i18n_update_mo.sh"
-echo " * write access to mapbender/log"
-echo " * write access to mapbender/http/tmp"
-echo " * write access to mapbender/resources/locale/ and subdirectories"
+# echo " * set the right to execute on this install script"
+# echo " * set the right to execute on mapbender/tools/i18n_update_mo.sh"
+# echo " * write access to mapbender/log"
+# echo " * write access to mapbender/http/tmp"
+# echo " * write access to mapbender/resources/locale/ and subdirectories"
 echo " * provide a database user that can create a database"
 echo ""
 echo ""
@@ -99,6 +99,12 @@
 	fi
 elif test $dbversion = "p" -a $dbenc = "i"
 then
+	#Creating database user with rw access
+	echo "Please specify a user for the database"
+	read mapbenderuser
+	
+	
+	
     	echo ""
 	    echo "Installing Mapbender with PostgreSQL (ISO-8859-1) in database $dbname";
 	    echo ""
@@ -163,7 +169,7 @@
     echo "The script will ask you several times for your database password. Don't be confused about this."
  
     
-        if test dbtemplate != ""
+        if test $dbtemplate != ""
         then  
            createdb -U $dbuser -E UTF-8 $dbname -T $dbtemplate
         else  
@@ -179,10 +185,41 @@
 	psql -U $dbuser -f pgsql/UTF-8/update/update_2.6rc1_to_2.6rc2_pgsql_UTF-8.sql $dbname > log_update.txt
 fi
 
+echo "The installer can set the permissions to the files"
+echo "and directory for you. If you want the installer to"
+echo "do this please enter (y)es else (n)o"
+echo "Please note, to do this you have to be"
+echo "read write access to the Mapbender directory"
+read automatic
+
+if test $automatic != "n"
+then
+      echo "Do you want that all files are owned by the apache webserver? (y)es or (n)o"
+      read setowner
+      if test $setowner != "n"
+      then
+	    echo "Please specify the webserver user"
+	    read webservuser
+	    chown -R $webservuser:$webservuser ../../
+      fi
+      echo "setting permissions on /resources/locale/ and subdirectories"
+      chmod -R o+rw ../locale
+      echo "setting execute rights on mapbender/tools/i18n_update_mo.sh"
+      chmod -R o+rx ../../tools/i18n_update_mo.sh
+      # creating mapbender.conf
+      cp ../../conf/mapbender.conf-dist ../../conf/mapbender.conf
+      
+fi
+
 echo ""
 echo "Compiling .po files..."
 cd ../../tools/
 ./i18n_update_mo.sh
+cd ../resources/db/
+echo "removing permissions on /resources/locale/ and subdirectories"
+chmod -R o-rw ../locale
+echo "removing execute rights on mapbender/tools/i18n_update_mo.sh"
+chmod -R o-rx ../../tools/i18n_update_mo.sh
 echo ""
 echo ""
 echo "Finished...check the log files to see if an error occured.";



More information about the Mapbender_commits mailing list