1 |
jpp |
1.1 |
diff -Nur smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf |
2 |
|
|
--- smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf 2018-04-08 21:56:59.210000000 -0400 |
3 |
|
|
+++ smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf 2018-04-08 22:02:23.304000000 -0400 |
4 |
|
|
@@ -202,14 +202,23 @@ |
5 |
|
|
|
6 |
|
|
|
7 |
|
|
# now we could mount home folder for each user using samba |
8 |
|
|
-if ($status eq "enabled") { |
9 |
|
|
- foreach (@users) { |
10 |
|
|
+foreach (@users) { |
11 |
|
|
my $key = $_->key; |
12 |
|
|
my $id = ""; |
13 |
|
|
my $user = $NCusers{$key}; |
14 |
|
|
# in case user not already know by NC, skip |
15 |
|
|
# normally not necessary, thanks to LDAP!! |
16 |
|
|
next if ($user eq ""); |
17 |
|
|
+ # let's create the root "ibays" folder to mount every ibays in nextcloud user space |
18 |
|
|
+ my ($login,$pass,$uid,$gid) = getpwnam("www"); |
19 |
|
|
+ my $idir = "/home/e-smith/files/nextcloud/data/$user"; |
20 |
|
|
+ unless ( !-d $idir || !-d "$idir/files" || -d "$idir/files/ibays") |
21 |
|
|
+ { |
22 |
|
|
+ mkdir "$idir/files/ibays", 0770; |
23 |
|
|
+ chown $uid, $gid,"$idir/files/ibays"; |
24 |
|
|
+ } |
25 |
|
|
+ # we proceed next only if we want the user homes |
26 |
|
|
+ next unless ($status eq "enabled"); |
27 |
|
|
# get existing mount |
28 |
|
|
%localmounts = listLocalMounts; |
29 |
|
|
# search for our current one |
30 |
|
|
@@ -241,7 +250,6 @@ |
31 |
|
|
} |
32 |
|
|
push @idOK,$id; |
33 |
|
|
|
34 |
|
|
- } |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
# set cron |