/[smecontribs]/rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz12096-bz12095.patch
ViewVC logotype

Diff of /rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz12096-bz12095.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by jpp, Fri Jul 8 16:30:14 2022 UTC Revision 1.3 by jpp, Fri Jul 8 18:24:00 2022 UTC
# Line 1  Line 1 
1  diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf  diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf
2  --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf        2022-07-08 12:03:27.238000000 -0400  --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf        2022-07-08 12:03:27.238000000 -0400
3  +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf    2022-07-08 12:07:34.584000000 -0400  +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf    2022-07-08 13:47:56.662000000 -0400
4  @@ -75,4 +75,9 @@  @@ -52,7 +52,12 @@
5         OCC "ldap:create-empty-config" # create config with empty id
6         OCC "ldap:create-empty-config" # create config with id s01
7         OCC "ldap:delete-config ''" # delte config with empty id
8    +    mkdir -p /home/e-smith/files/nextcloud/skeleton/ibays
9    +    /usr/bin/occ config:system:set  skeletondirectory --value="/home/e-smith/files/nextcloud/skeleton"
10    +    #/usr/bin/occ config:system:set  templatedirectory --value=""
11     else
12    +    mkdir -p /home/e-smith/files/nextcloud/skeleton/ibays
13    +    /usr/bin/occ config:system:set  skeletondirectory --value="/home/e-smith/files/nextcloud/skeleton"
14         # to satisfy code integrity check
15         if [ -f /usr/share/nextcloud/.htaccess.rpmsave ]; then
16             rm -f /usr/share/nextcloud/.htaccess.rpmsave
17    @@ -75,4 +80,9 @@
18     mkdir -p /var/www/.cache/samba     mkdir -p /var/www/.cache/samba
19     chown www:shared /var/www/.cache/samba     chown www:shared /var/www/.cache/samba
20   fi   fi
# Line 13  diff -Nur --no-dereference smeserver-nex Line 26  diff -Nur --no-dereference smeserver-nex
26    
27  diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf  diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf
28  --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf    2022-07-08 12:03:27.223000000 -0400  --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf    2022-07-08 12:03:27.223000000 -0400
29  +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf        2022-07-08 12:29:34.464000000 -0400  +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf        2022-07-08 14:12:02.289000000 -0400
30  @@ -148,6 +148,9 @@  @@ -148,11 +148,16 @@
31       OCC "ldap:set-config s01 ldapExpertUUIDGroupAttr cn";       OCC "ldap:set-config s01 ldapExpertUUIDGroupAttr cn";
32       OCC "ldap:set-config s01 ldapExpertUUIDUserAttr uid";       OCC "ldap:set-config s01 ldapExpertUUIDUserAttr uid";
33       OCC "ldap:set-config s01 ldapExpertUsernameAttr uid";       OCC "ldap:set-config s01 ldapExpertUsernameAttr uid";
34  +    # test new config to make it available, and sync user/groups  +    # test new config to make it available, and sync user/groups
35  +    OCC "ldap:test-config s01";  +    OCC "ldap:test-config s01";
36  +    %NCusers= listUsers;  +    %NCusers= listUsers;
37    +    my $totrash = OCCr "group:list";
38    
39   # set ibays shares   # set ibays shares
40   foreach ( @ibays) {   foreach ( @ibays) {
41       my $group = $_->prop('Group') ||'';
42       my $key =  $_->key;
43    +  print "Configuring file repo :  $key\n";
44       my $id = "";
45       my $typ = $_->prop('type');
46       my @wgroups = split(',', $_->prop('WriteGroups')||'');
47    @@ -183,9 +188,11 @@
48          $id = OCCr "files_external:create -c datadir=/home/e-smith/files/$typ/$key 'ibays/$key'  local null::null  --output json";
49        }
50        for $group (@groups) {
51    +       print "  adding group $group to file repo $id\n";
52            OCC "files_external:applicable --add-group $group $id --output json";
53        }
54        for my $u (@uUsers) {
55    +       print "  adding user $u to file repo $id\n";
56             OCC "files_external:applicable --add-user $u $id  --output json" ;
57        }
58        push @idOK,$id;
59    @@ -240,6 +247,7 @@
60       my $key =  $_->key;
61       my $id = "";
62       my $user = $NCusers{$key};
63    +  print "Configuring user $user ($key)\n";
64       # in case user not already know by NC, skip
65       # normally not necessary, thanks to LDAP!!
66       next if ($user eq "");
67    @@ -249,6 +257,7 @@
68       unless ( !-d $idir || !-d "$idir/files" || -d "$idir/files/ibays")
69       {  
70             mkdir "$idir/files/ibays", 0770;
71    +        print "  created $idir/files/ibays\n";
72       }
73       # we do this on every turn in case it was wrong
74       chown $uid, $gid,"$idir/files/ibays";
75    @@ -269,13 +278,13 @@
76        $id = OCCr "files_external:create -c share=$key -c host=localhost -c domain=$workgroup -c root='' -c show_hidden=false -c check_acl=false -c timeout='' '$key' smb password::logincredentials --output json";
77        OCC "files_external:applicable --add-user $user $id";
78        push @idOK,$id;
79    -   print "created home dir for $key $user\n";
80    +   print "  created home dir for $key $user\n";
81        next;
82       }
83    
84       if (scalar(@matching_keys) > 1) {
85        #if more than 1 delete all but older
86    -   print "more than one $key, deleting the latest, keeping first\n";
87    +   print "  more than one $key, deleting the latest, keeping first\n";
88        while (scalar(@matching_keys) > 1){
89         my $bad = pop @matching_keys;
90         OCC "files_external:delete $bad -y";
91    @@ -283,7 +292,7 @@
92       }
93       $id = pop @matching_keys;
94       if (scalar(@{$localmounts{$id}{'applicable_groups'}}) >0 || scalar(@{$localmounts{$id}{'applicable_users'}}) >1 || scalar(@{$localmounts{$id}{'applicable_users'}}) == 0 || $localmounts{$id}{'applicable_users'}[0] ne $user) {
95    -    print "updating $key\n";
96    +    print "  updating $key\n";
97         OCC "files_external:applicable --remove-all $id";
98         OCC "files_external:applicable --add-user $user $id" ;
99       }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed