You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/04/18 08:12:33 UTC

svn commit: r766232 - /ofbiz/trunk/debian/ofbiz-framework.postinst

Author: doogie
Date: Sat Apr 18 06:12:32 2009
New Revision: 766232

URL: http://svn.apache.org/viewvc?rev=766232&view=rev
Log:
Create the initial admin login account.  The userLoginId is
hard-coded for now, but that will change soon.

Modified:
    ofbiz/trunk/debian/ofbiz-framework.postinst

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=766232&r1=766231&r2=766232&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Sat Apr 18 06:12:32 2009
@@ -22,6 +22,7 @@
 JAVA_HOME=""
 JAVA_HOMES="/usr/lib/jvm/java-6-openjdk"
 OFBIZ_HOME="/usr/share/ofbiz"
+ofbiz_admin_user=admin
 for possible in $JAVA_HOMES; do
 	if [ -e "$possible/bin/java" ]; then
 		JAVA_HOME="$possible"
@@ -221,6 +222,9 @@
 		dpkg-trigger --no-await ofbiz-install
 		if [ -z "$2" ]; then
 			mkdir -p "/var/lib/ofbiz/import/"
+			out="/var/lib/ofbiz/import/ofbiz-framework.xml"
+			sed "s/@userLoginId@/$ofbiz_admin_user/g" < "$OFBIZ_HOME/framework/resources/templates/AdminUserLoginData.xml" > "$out.new"
+			mv "$out.new" "$out"
 			if ! getent passwd ofbiz 2>/dev/null >/dev/null; then
 				adduser --quiet --group --no-create-home --system --shell /bin/sh --home /var/lib/ofbiz ofbiz
 			fi