From 1b83f2db4234b66d223fb5641a94aaba4e835237 Mon Sep 17 00:00:00 2001 From: mlutfy <> Date: Wed, 28 Jan 2009 20:38:11 +0000 Subject: [PATCH] on new account creation, create automatically www, stats and backups directories to help users keep their account clean --- src/mem_add | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mem_add b/src/mem_add index 9aa74d6e..6f09db5c 100755 --- a/src/mem_add +++ b/src/mem_add @@ -27,9 +27,13 @@ $( = $); my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name; -mkdir($PTH); -chown(33, $uid, $PTH); -system("/bin/chmod 02770 '$PTH'"); +my @create_paths = ($PTH, $PTH . '/www', $PTH . '/stats', $PTH . '/backups'); + +for my $p (@create_paths) { + mkdir($p); + chown(33, $uid, $p); + system("/bin/chmod 02770 '$p'"); +} 0;