Merge "Allow a non-127.0.0.1 definition for the hostname."
This commit is contained in:
commit
f80c750d75
2
stack.sh
2
stack.sh
@ -368,7 +368,7 @@ safe_chmod 0755 $DATA_DIR
|
|||||||
# Certain services such as rabbitmq require that the local hostname resolves
|
# Certain services such as rabbitmq require that the local hostname resolves
|
||||||
# correctly. Make sure it exists in /etc/hosts so that is always true.
|
# correctly. Make sure it exists in /etc/hosts so that is always true.
|
||||||
LOCAL_HOSTNAME=`hostname -s`
|
LOCAL_HOSTNAME=`hostname -s`
|
||||||
if [ -z "`grep ^127.0.0.1 /etc/hosts | grep $LOCAL_HOSTNAME`" ]; then
|
if ! fgrep -qwe "$LOCAL_HOSTNAME" /etc/hosts; then
|
||||||
sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts
|
sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user