Subversion Repositories ALCASAR

Rev

Rev 1743 | Rev 1747 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1743 Rev 1744
Line 51... Line 51...
51
}
51
}
52
 
52
 
53
function domainName() # change the domain name in the conf files
53
function domainName() # change the domain name in the conf files
54
{
54
{
55
 
55
 
56
	fqdn=$(openssl x509 -noout -subject -in $cert | sed -n '/^subject/s/^.*CN=//p')
56
	fqdn=$(openssl x509 -noout -subject -in $cert | sed -n '/^subject/s/^.*CN=//p' | cut -d'/' -f 1)
57
	hostname=`echo $fqdn | awk -F'.' '{ print $1 }'`
57
	hostname=`echo $fqdn | awk -F'.' '{ print $1 }'`
58
	domain=`echo $fqdn | awk -F'.' '{$1="";OFS=".";print $0}' |sed 's/^.//'`
58
	domain=`echo $fqdn | awk -F'.' '{$1="";OFS=".";print $0}' |sed 's/^.//'`
59
	echo "fqdn=$fqdn hostname=$hostname domain=$domain"
59
	echo "fqdn=$fqdn hostname=$hostname domain=$domain"
60
	if [ "$fqdn" != "" ]
60
	if [ "$fqdn" != "" ]
61
	then
61
	then