From 7a4489f9853ba9a0c17088f2729ca819a44decab Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 29 Jun 2010 09:17:20 -0400
Subject: [PATCH] Implemented: FS#1101 - Use relative paths for symlinks to enable modules.

---
 server/plugins-available/shelluser_jailkit_plugin.inc.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index b915e9f..c1b32ab 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -85,14 +85,14 @@
 				$this->app = $app;
 				$this->jailkit_config = $app->getconf->get_server_config($conf["server_id"], 'jailkit');
 				
-				$command .= 'usermod -U '.escapeshellcmd($data['new']['username']);
-				exec($command);
-				
 				$this->_update_website_security_level();
-				
-				$this->_add_jailkit_user();
 			
 				$this->_setup_jailkit_chroot();
+				
+				$this->_add_jailkit_user();
+				
+				$command .= 'usermod -U '.escapeshellcmd($data['new']['username']);
+				exec($command);
 				
 				$this->_update_website_security_level();
 			}
@@ -160,7 +160,7 @@
 			//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
 			
 			if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
-				$command = 'userdel -f -r';
+				$command = 'userdel';
 				$command .= ' '.escapeshellcmd($data['old']['username']);
 				exec($command);
 				$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);

--
Gitblit v1.9.1