Ignore:
Timestamp:
Aug 29, 2008, 6:17:32 PM (16 years ago)
Author:
andersk
Message:
Create scriptsVhost records automatically.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/common/oursrc/accountadm/vhostadd

    r765 r827  
    2727IFS=: read user x uid gid x home x <<< "$pw"
    2828
     29user_dn=$(ldapsearch -LLL -x -b ou=People,dc=scripts,dc=mit,dc=edu '(uid=andersk)' dn | perl -0pe 's/\n //g; s/^dn: //')
     30
    2931printf "Docroot: $home/web_scripts" >&2
    3032read subdir
     
    5052apacheSuexecUid: $uid
    5153apacheSuexecGid: $gid
     54
     55dn: scriptsVhostName=$host,ou=VirtualHosts,dc=scripts,dc=mit,dc=edu
     56objectClass: scriptsVhost
     57objectClass: top
     58scriptsVhostName: $host
     59EOF
     60
     61if [ "${host%mit.edu}" != "$host" ]; then
     62    cat <<EOF >> "$tmpfile"
     63scriptsVhostAlias: ${host%.mit.edu}
     64EOF
     65fi
     66
     67cat <<EOF >> "$tmpfile"
     68scriptsVhostAccount: $user_dn
     69scriptsVhostDirectory: ${subdir#/}
    5270EOF
    5371
Note: See TracChangeset for help on using the changeset viewer.