Changeset 2759 for trunk/locker/sbin


Ignore:
Timestamp:
Feb 26, 2016, 6:08:08 AM (6 years ago)
Author:
andersk
Message:
Remove all remaining traces of apacheConfig records
Location:
trunk/locker/sbin
Files:
3 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])
  • trunk/locker/sbin/vhostadd

    r2735 r2759  
    4242
    4343cat <<EOF > "$tmpfile"
    44 dn: apacheServerName=$host,ou=VirtualHosts,dc=scripts,dc=mit,dc=edu
    45 objectClass: apacheConfig
    46 objectClass: top
    47 apacheServerName: $host
    48 EOF
    49 
    50 if [ "${host%mit.edu}" != "$host" ]; then
    51     cat <<EOF >> "$tmpfile"
    52 apacheServerAlias: ${host%.mit.edu}
    53 EOF
    54 fi
    55 
    56 cat <<EOF >> "$tmpfile"
    57 apacheDocumentRoot: $docroot
    58 apacheSuexecUid: $uid
    59 apacheSuexecGid: $gid
    60 
    6144dn: scriptsVhostName=$host,ou=VirtualHosts,dc=scripts,dc=mit,dc=edu
    6245objectClass: scriptsVhost
  • trunk/locker/sbin/vhostedit

    r2638 r2759  
    77
    88exec ldapvi --bind sasl -Y GSSAPI -h scripts5.mit.edu -b dc=scripts,dc=mit,dc=edu \
    9        "(|(&(objectClass=apacheConfig)(|$(printf '(apacheServerName=%s)' "$@")$(printf '(apacheServerAlias=%s)' "$@")))(&(objectClass=scriptsVhost)(|$(printf '(scriptsVhostName=%s)' "$@")$(printf '(scriptsVhostAlias=%s)' "$@"))))"
     9       "(&(objectClass=scriptsVhost)(|$(printf '(scriptsVhostName=%s)' "$@")$(printf '(scriptsVhostAlias=%s)' "$@")))"
Note: See TracChangeset for help on using the changeset viewer.