mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add the damn short hostname to /etc/hosts automagically
This commit is contained in:
parent
c6f184960c
commit
e67dc79197
1 changed files with 5 additions and 0 deletions
|
@ -64,6 +64,11 @@ do_post_regen() {
|
||||||
systemctl restart resolvconf
|
systemctl restart resolvconf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Some stupid things like rabbitmq-server used by onlyoffice won't work if
|
||||||
|
# the *short* hostname doesn't exists in /etc/hosts -_-
|
||||||
|
short_hostname=$(hostname -s)
|
||||||
|
grep -q "127.0.0.1.*$short_hostname" /etc/hosts || echo -e "127.0.0.1\t$short_hostname" >>/etc/hosts
|
||||||
|
|
||||||
[[ -z "$regen_conf_files" ]] \
|
[[ -z "$regen_conf_files" ]] \
|
||||||
|| service dnsmasq restart
|
|| service dnsmasq restart
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue