Changeset 827


Ignore:
Timestamp:
Aug 29, 2008, 6:17:32 PM (14 years ago)
Author:
andersk
Message:
Create scriptsVhost records automatically.
Location:
server/common/oursrc/accountadm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • server/common/oursrc/accountadm/signup-scripts-backend.in

    r769 r827  
    104104
    105105dn: apacheServerName=$username.scripts.mit.edu,ou=VirtualHosts,dc=scripts,dc=mit,dc=edu
    106 objectclass: apacheConfig
     106objectClass: apacheConfig
    107107apacheServerName: $username.scripts.mit.edu
    108108apacheServerAlias: $username.scripts
     
    110110apacheSuexecUid: $uid1
    111111apacheSuexecGid: $gid1
     112
     113dn: scriptsVhostName=$username.scripts.mit.edu,ou=VirtualHosts,dc=scripts,dc=mit,dc=edu
     114objectClass: scriptsVhost
     115scriptsVhostName: $username.scripts.mit.edu
     116scriptsVhostAlias: $username.scripts
     117scriptsVhostAccount: uid=$username,ou=People,dc=scripts,dc=mit,dc=edu
     118scriptsVhostDirectory:
    112119
    113120EOF
  • 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.