Index: debian_installer/lams2/debian/postinst =================================================================== diff -u -r4fabe05a8702229c06ceee3f2a2d3a5580fe8302 -rbae6cea7eb46a03b052335fead84b0a9723ec7ff --- debian_installer/lams2/debian/postinst (.../postinst) (revision 4fabe05a8702229c06ceee3f2a2d3a5580fe8302) +++ debian_installer/lams2/debian/postinst (.../postinst) (revision bae6cea7eb46a03b052335fead84b0a9723ec7ff) @@ -17,6 +17,29 @@ # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +update220to230 () { + # Add assessment tool, new in 2.3 + cd /usr/share/lams2/lams_tool_assessment/ + sed -i -e "s/\(\).*\(\?.*\)\(<\/dbDriverUrl>\)/\1jdbc:mysql:\/\/localhost:3306\/$db_name\2\3/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbUsername>\)/\1$db_user\2/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbPassword>\)/\1$db_pass\2/" deploy.xml + ./deploy.sh > /dev/null || true + + # Add mindmap tool, new in 2.3 + cd /usr/share/lams2/lams_tool_mindmap/ + sed -i -e "s/\(\).*\(\?.*\)\(<\/dbDriverUrl>\)/\1jdbc:mysql:\/\/localhost:3306\/$db_name\2\3/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbUsername>\)/\1$db_user\2/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbPassword>\)/\1$db_pass\2/" deploy.xml + ./deploy.sh > /dev/null || true + + # Add pixlr tool, new in 2.3 + cd /usr/share/lams2/lams_tool_pixlr/ + sed -i -e "s/\(\).*\(\?.*\)\(<\/dbDriverUrl>\)/\1jdbc:mysql:\/\/localhost:3306\/$db_name\2\3/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbUsername>\)/\1$db_user\2/" deploy.xml + sed -i -e "s/\(\).*\(<\/dbPassword>\)/\1$db_pass\2/" deploy.xml + ./deploy.sh > /dev/null || true +} + configure220 () { # Configure 2.2 tools; need to run after above tools have been deployed if [ "$db_root_pass" != "" ] ; then @@ -148,11 +171,16 @@ sed -i -e "s/port=\"8080\"/port=\"$server_port\"/" server.xml case "$2" in + 2.2.0*) + update; + ;; + 2.1.1*) update; update211to220; configure220; ;; + 2.1.0*) update; update210to211;