From e7fe65460ae3d2246f1299ec0cbdaeea9cdcebb1 Mon Sep 17 00:00:00 2001
From: Purodha Blissenbach <purodha.blissenbach@hostsharing.net>
Date: Thu, 20 Sep 2012 17:10:41 +0200
Subject: [PATCH] Merge branch 'master' of ssh://hsh04-source@hsh04.hostsharing.net/home/doms/source.hostsharing.net/source/hsadmin.git

---
 hsarback/database/schema.sql                                 |    7 ++++---
 hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/hsarback/database/schema.sql b/hsarback/database/schema.sql
index 98645d7..0424bd4 100644
--- a/hsarback/database/schema.sql
+++ b/hsarback/database/schema.sql
@@ -912,16 +912,17 @@
 );
 
 ALTER TABLE ONLY domain_option
-    ADD CONSTRAINT domain_option_uniq UNIQUE (domain_option_id);
+    ADD CONSTRAINT pk_domain_option PRIMARY KEY (domain_option_id);
 
-CREATE UNIQUE INDEX ON domain_option ( domain_option_name );
+CREATE UNIQUE INDEX domain_option_name_idx ON domain_option USING btree ( domain_option_name );
     
 CREATE TABLE domain__domain_option (
 	domain_option_id integer NOT NULL,
 	domain_id integer NOT NULL
 ); 
 
-CREATE UNIQUE INDEX unique_domain__domain_option ON domain__domain_option USING btree (domain_option_id, domain_id);
+ALTER TABLE ONLY domain__domain_option
+    ADD CONSTRAINT pk_domain__domain_option PRIMARY KEY (domain_option_id, domain_id);
 
 ALTER TABLE ONLY domain__domain_option
     ADD CONSTRAINT domain_option_id_fkey FOREIGN KEY (domain_option_id) 
diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
index 5214daa..ead2757 100644
--- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -249,13 +249,13 @@
 					"chmod g+rx " + homeDir + " && " +
 					"mkdir --mode=1550 --parents " + domsDir + " && " +
 					"chown httpd:" + pacName + " " + domsDir + " && " +
-					"mkdir --mode=750 " + domainDir + " && " +
+					"mkdir --mode=750 --parents " + domainDir + " && " +
 					"chown " + userName + ":httpd " + domainDir 
 					);
 		CompoundProcessor domDirsProcessor = new CompoundProcessor(mkDomainDirProzessor);
 		for (String subDir : subDirs) {
 			domDirsProcessor.appendProcessor(new ShellProcessor(
-					"mkdir --mode=755 " + domainDir + "/" + subDir + " && " +
+					"mkdir --mode=755 --parents " + domainDir + "/" + subDir + " && " +
 					"chown " + userName + ":" + pacName +  " " + domainDir + "/" + subDir
 				));
 		}
@@ -288,7 +288,7 @@
 			);
 		}
 		domDirsProcessor.appendProcessor(
-				new ShellProcessor("ln -s " + domainDir + " /home/doms/ && " +
+				new ShellProcessor("ln -sf " + domainDir + " /home/doms/ && " +
 						"chown --no-dereference " + userName + ":httpd /home/doms/" + domName 
 						 + " && " + "chown " + userName + ":httpd /home/doms/" + domName + "/")
 			);

--
Gitblit v1.9.0-SNAPSHOT