Update /etc/hosts when linked container is restarted

Fix #6350


It's just a copy/paste of above, I know how to use named return variables but thanks for this go teaching lesson :)