Ignore:
Timestamp:
Feb 26, 2016, 6:08:08 AM (6 years ago)
Author:
andersk
Message:
Remove all remaining traces of apacheConfig records
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/locker/sbin/delete-user

    r2146 r2759  
    3737    return group_record
    3838
    39 def findApacheConfig(l, uid):
    40     host_records = ll.search_s(
    41         "ou=VirtualHosts,dc=scripts,dc=mit,dc=edu",
    42         ldap.SCOPE_SUBTREE,
    43         ldap.filter.filter_format(
    44             "(&(objectClass=apacheConfig)" +
    45             "(apacheSuexecUid=%s))",
    46             [uid]))
    47 
    48     return host_records
    49 
    5039def findVhost(l, full_name):
    5140    host_records = ll.search_s(
     
    7362    group_record = findGroup(ll, user)
    7463
    75     print "Searching for apache configurations..."
    76     apache_configs = findApacheConfig(ll, user_record[1]['uidNumber'][0])
    77 
    7864    print "Searching for vhost configurations..."
    7965    vhost_configs = findVhost(ll, user_record[0])
     
    8369    delete_record(ll, group_record[0])
    8470
    85     for config in apache_configs:
    86         delete_record(ll, config[0])
    87 
    8871    for vhost in vhost_configs:
    8972        delete_record(ll, vhost[0])
Note: See TracChangeset for help on using the changeset viewer.