aboutsummaryrefslogtreecommitdiff
path: root/scripts/common/10-vars
blob: a82dd44b35bfd48a8c7ed1c51f4255d732439783 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

if [ "${idm_bootstrap:-}" = true ]; then
  resolvers=$bootstrap_resolvers
  pkg_host=$pkg_host_ip
else
  : ${resolvers:="$(echo "$idm_server_list" | awk '{printf "%s ",$3}')"}
  : ${pkg_host:="pkg.${domain}"}
fi

idm_hostnames=$(echo "$idm_server_list" | awk '{print $1}')

fqdn="${BOXCONF_HOSTNAME}.${domain}"
: ${smtp_host:="smtp.${domain}"}
: ${postgres_host:="postgres.${domain}"}

realm=$(echo "$domain" | tr '[:lower:]' '[:upper:]')

basedn=$(echo "$domain" | sed -e 's/^/dc=/' -e 's/\./,dc=/g')
ldap_uri=$(printf "ldap://%s.${domain}/ " $idm_hostnames)
ldaps_uri=$(printf "ldaps://%s.${domain}/ " $idm_hostnames)
ldap_hosts=$(printf "%s.${domain} " $idm_hostnames)
accounts_basedn="ou=accounts,${basedn}"
users_basedn="ou=users,${accounts_basedn}"
people_basedn="ou=people,${users_basedn}"
robots_basedn="ou=robots,${users_basedn}"
hosts_basedn="ou=hosts,${accounts_basedn}"
services_basedn="ou=services,${accounts_basedn}"
groups_basedn="ou=groups,${accounts_basedn}"
private_groups_basedn="ou=userprivate,${groups_basedn}"
roles_basedn="ou=roles,${groups_basedn}"
automount_basedn="ou=automount,${basedn}"
sudo_basedn="ou=sudo,${basedn}"
dns_basedn="ou=dns,${basedn}"
kdc_basedn="cn=kdc,${basedn}"

boxconf_dn="uid=${boxconf_username},${robots_basedn}"