aboutsummaryrefslogtreecommitdiff
path: root/xenial-amd64-tcwg-x2go/run.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-02-10 10:11:01 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-02-10 10:11:01 +0000
commita06b1ba496e85207906cfa0c7401a832caf10238 (patch)
tree872f1fab6f083da670cc67e991c4bae388f27a13 /xenial-amd64-tcwg-x2go/run.sh
parentf457135455ba32e269f705d338042914ad9aef08 (diff)
xenial-amd64-tcwg-x2go: Base on xenial-amd64-tcwg-dev.HEADmaster
Change-Id: I124b0008aad64d80ac1b7995ddfd13179afbc4ee
Diffstat (limited to 'xenial-amd64-tcwg-x2go/run.sh')
-rwxr-xr-xxenial-amd64-tcwg-x2go/run.sh35
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