From ab320bd06c46960b3d87be151379dd89d9b3e59b Mon Sep 17 00:00:00 2001 From: Dominique Marcadet <dominique.marcadet@centralesupelec.fr> Date: Fri, 22 Dec 2023 17:34:57 +0100 Subject: [PATCH] add hostname only on MyDocker --- root/usr/local/lib/wrapper_script.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/usr/local/lib/wrapper_script.sh b/root/usr/local/lib/wrapper_script.sh index 1c7688c..a453e0a 100755 --- a/root/usr/local/lib/wrapper_script.sh +++ b/root/usr/local/lib/wrapper_script.sh @@ -7,8 +7,9 @@ chown -R abc:abc /config if [ "$2" ]; then export CUSTOM_USER=$1 export PASSWORD=$2 + + # Do this only on MyDocker where there are 2 IP adresses + echo "$(hostname -I | cut -f2 -d' ') $HOSTNAME" >> /etc/hosts fi -echo "$(hostname -I | cut -f2 -d' ') $HOSTNAME" >> /etc/hosts - exec /init -- GitLab