parent
68ae215739
commit
dd1fd2bf0b
|
@ -27,7 +27,7 @@ MYSQL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)'
|
||||||
MYSQL_MAIL_USER=alternc_user
|
MYSQL_MAIL_USER=alternc_user
|
||||||
MYSQL_MAIL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `"
|
MYSQL_MAIL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `"
|
||||||
MYSQL_CLIENT=localhost
|
MYSQL_CLIENT=localhost
|
||||||
FQDN="`cat /etc/mailname 2>/dev/null || hostname -f`"
|
FQDN="`(cat /etc/mailname 2>/dev/null || hostname -f)|tr '[:upper:]' '[:lower:]'`"
|
||||||
INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`"
|
INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`"
|
||||||
PUBLIC_IP="$INTERNAL_IP"
|
PUBLIC_IP="$INTERNAL_IP"
|
||||||
DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`"
|
DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`"
|
||||||
|
@ -47,7 +47,14 @@ fi
|
||||||
db_set alternc/hostingname "$HOSTING"
|
db_set alternc/hostingname "$HOSTING"
|
||||||
db_set alternc/desktopname "$FQDN"
|
db_set alternc/desktopname "$FQDN"
|
||||||
db_input high alternc/hostingname || true
|
db_input high alternc/hostingname || true
|
||||||
|
|
||||||
|
# Get the FQDN
|
||||||
db_input high alternc/desktopname || true
|
db_input high alternc/desktopname || true
|
||||||
|
# Be sure that the FQDN is lowercase (Bug #1405)
|
||||||
|
db_get alternc/desktopname
|
||||||
|
db_set alternc/desktopname "`echo $RET | tr '[:upper:]' '[:lower:]'`"
|
||||||
|
# End bug #1405
|
||||||
|
|
||||||
db_go || true
|
db_go || true
|
||||||
#we ask for the public and private ip
|
#we ask for the public and private ip
|
||||||
db_set alternc/public_ip "$PUBLIC_IP"
|
db_set alternc/public_ip "$PUBLIC_IP"
|
||||||
|
@ -56,7 +63,7 @@ while [ $STATE -eq 0 ]; do
|
||||||
db_input high alternc/public_ip || true
|
db_input high alternc/public_ip || true
|
||||||
db_go
|
db_go
|
||||||
db_get alternc/public_ip
|
db_get alternc/public_ip
|
||||||
ip=$RET
|
ip="$RET"
|
||||||
if [ $(echo $ip |egrep '(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1)$') ]; then
|
if [ $(echo $ip |egrep '(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1)$') ]; then
|
||||||
db_input high alternc/use_private_ip || true
|
db_input high alternc/use_private_ip || true
|
||||||
db_go
|
db_go
|
||||||
|
|
Loading…
Reference in New Issue