Skip to content

Commit a89eb2f

Browse files
committed
Fixed moving of site when the client is changed.
1 parent d053cb0 commit a89eb2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ function update($event_name,$data) {
269269
exec('mv '.$data["old"]["document_root"].' '.$new_dir);
270270
$app->log("Moving site to new document root: ".'mv '.$data["old"]["document_root"].' '.$new_dir,LOGLEVEL_DEBUG);
271271

272+
$command = 'usermod';
273+
$command .= ' --home '.escapeshellcmd($data["new"]["document_root"]);
274+
$command .= ' '.escapeshellcmd($data["new"]["system_user"]);
275+
exec($command);
276+
272277
}
273278

274279
//print_r($data);

0 commit comments

Comments
 (0)