Merge branch 'master' into 3609-arv-run
[arvados.git] / docker / shell / setup.sh.in
1 #!/bin/bash
2
3 USER_NAME="@@ARVADOS_USER_NAME@@"
4
5 useradd $USER_NAME -s /bin/bash
6 mkdir /home/$USER_NAME/.ssh -p
7
8 cp ~root/.ssh/authorized_keys /home/$USER_NAME/.ssh/authorized_keys
9
10 # Install our token
11 mkdir -p /home/$USER_NAME/.config/arvados;
12 echo "ARVADOS_API_HOST=api" >> /home/$USER_NAME/.config/arvados/settings.conf
13 echo "ARVADOS_API_HOST_INSECURE=yes" >> /home/$USER_NAME/.config/arvados/settings.conf
14 echo "ARVADOS_API_TOKEN=$(cat /tmp/superuser_token)" >> /home/$USER_NAME/.config/arvados/settings.conf
15 chmod 600 /home/$USER_NAME/.config/arvados/settings.conf
16
17 chown $USER_NAME:$USER_NAME /home/$USER_NAME -R
18
19 rm -f /tmp/superuser_token
20
21