From a89eb2fde33d052a815767f17111a05a2b763e24 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 14 Feb 2009 10:58:32 -0500
Subject: [PATCH] Fixed moving of site when the client is changed.
---
server/plugins-available/apache2_plugin.inc.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 3a5cbda..f88cff2 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -269,6 +269,11 @@
exec('mv '.$data["old"]["document_root"].' '.$new_dir);
$app->log("Moving site to new document root: ".'mv '.$data["old"]["document_root"].' '.$new_dir,LOGLEVEL_DEBUG);
+ $command = 'usermod';
+ $command .= ' --home '.escapeshellcmd($data["new"]["document_root"]);
+ $command .= ' '.escapeshellcmd($data["new"]["system_user"]);
+ exec($command);
+
}
//print_r($data);
--
Gitblit v1.9.1