1 |
diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete |
2 |
--- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete 2013-01-31 16:31:37.000000000 -0500 |
3 |
+++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete 2016-06-26 12:16:35.379000000 -0400 |
4 |
@@ -36,6 +36,7 @@ |
5 |
x=0 # exit value |
6 |
|
7 |
/bin/rm -rf /home/e-smith/files/ibays/$ibay |
8 |
+/bin/rm -rf /var/cache/e-smith/files/ibays/$ibay |
9 |
if [ "$ldapauth" != "enabled" ] |
10 |
then |
11 |
/usr/sbin/userdel "$ibay" || x=1 |
12 |
diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify |
13 |
--- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:03:21.373000000 -0400 |
14 |
+++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:25:45.073000000 -0400 |
15 |
@@ -158,11 +158,14 @@ |
16 |
#-------------------------------------------------- |
17 |
# main directory is writeable only by root |
18 |
#-------------------------------------------------- |
19 |
-##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled' |
20 |
+##create ibay cache dir |
21 |
+my $cachedir= ('/var/cache/e-smith/files/ibays/' . $ibay->key ); |
22 |
+mkdir $cachedir unless (-d $cachedir); |
23 |
+##create the upload_tmp_folder in the ibay cache dir if PHPTmpDir is set to 'enabled' |
24 |
my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; |
25 |
$tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; |
26 |
mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); |
27 |
- |
28 |
+##create the session dir in the ibay cache dir if is set to 'enabled' |
29 |
my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; |
30 |
$sessdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session') if $sessdir eq 'enabled'; |
31 |
mkdir $sessdir unless (-d $sessdir || $sessdir eq "disabled"); |
32 |
diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays |
33 |
--- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:03:21.373000000 -0400 |
34 |
+++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:15:18.526000000 -0400 |
35 |
@@ -71,18 +71,25 @@ |
36 |
{ |
37 |
#Then we retrieve the name of the ebay |
38 |
my $key = $ibay->key; |
39 |
- my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; |
40 |
- my $sessiondb = $ibay->prop('PHPSessionDir') || 'enabled'; |
41 |
- my $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp'); |
42 |
- |
43 |
- #we test the condition if /tmp exists or if it is disabled in the Ibay |
44 |
- unless (-d $path || $tmpdb eq "disabled") |
45 |
+ my $path = (('/var/cache/e-smith/files/ibays/') . $key ); |
46 |
+ #we test the condition if ibay folder exists |
47 |
+ unless (-d $path ) |
48 |
{ |
49 |
mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
50 |
chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
51 |
} |
52 |
- #we test the condition if /session exists or if it is disabled in the Ibay |
53 |
- unless (-d $path || $sessiondb eq "disabled") |
54 |
+ |
55 |
+ $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp'); |
56 |
+ #we test the condition if /tmp exists |
57 |
+ unless (-d $path) |
58 |
+ { |
59 |
+ mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
60 |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
61 |
+ } |
62 |
+ |
63 |
+ $path = (('/var/cache/e-smith/files/ibays/') . $key . '/session'); |
64 |
+ #we test the condition if /session exists |
65 |
+ unless (-d $path) |
66 |
{ |
67 |
mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
68 |
chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |