diff options
Diffstat (limited to 'xenial-amd64-tcwg-x2go/run.sh')
-rwxr-xr-x | xenial-amd64-tcwg-x2go/run.sh | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/xenial-amd64-tcwg-x2go/run.sh b/xenial-amd64-tcwg-x2go/run.sh deleted file mode 100755 index ed6a9b5..0000000 --- a/xenial-amd64-tcwg-x2go/run.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -if [ x"$@" = x"start.sh" ]; then - cat /start.sh - exit 0 -fi - -if ! [ -f /etc/sudoers.d/user ]; then - passwd_ent="$1" - groupname="$2" - pubkey="$3" - - username="$(echo $passwd_ent | cut -d: -f 1)" - uid="$(echo $passwd_ent | cut -d: -f 3)" - gid="$(echo $passwd_ent | cut -d: -f 4)" - comment="$(echo $passwd_ent | cut -d: -f 5)" - home="$(echo $passwd_ent | cut -d: -f 6)" - shell="$(echo $passwd_ent | cut -d: -f 7)" - - groupadd -g "$gid" "$groupname" - useradd -m -u "$uid" -g "$groupname" -c "$comment" -s "$shell" "$username" - - if ! [ -f /home/$username/.ssh/authorized_keys.docker ] \ - && [ x"$pubkey" != x"" ]; then - sudo -u $username mkdir -p /home/$username/.ssh/ - echo "$pubkey" | sudo -u $username tee /home/$username/.ssh/authorized_keys.docker > /dev/null - fi - - echo "$username ALL = NOPASSWD: ALL" > /etc/sudoers.d/user - chmod 440 /etc/sudoers.d/user -fi - -exec /usr/sbin/sshd -D |