From 39e54cc83b2d4d78191ada3dceafa22208336641 Mon Sep 17 00:00:00 2001 From: Georg Date: Sat, 14 Aug 2021 20:38:16 +0200 Subject: Improvements 14/08/2021 Signed-off-by: Georg --- lcpubsh/image_template/user-mapping.sh | 21 --------------------- lcpubsh/image_template/user_mapping.sh | 1 + 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 lcpubsh/image_template/user-mapping.sh create mode 120000 lcpubsh/image_template/user_mapping.sh (limited to 'lcpubsh/image_template') diff --git a/lcpubsh/image_template/user-mapping.sh b/lcpubsh/image_template/user-mapping.sh deleted file mode 100644 index f2aa456..0000000 --- a/lcpubsh/image_template/user-mapping.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Original by https://github.com/sleeepyjack/dockersh -# Modified by georg@lysergic.dev -if [ -z "${HOST_USER_NAME}" -o -z "${HOST_USER_ID}" -o -z "${HOST_USER_GID}" ]; then - echo "HOST_USER_NAME, HOST_USER_ID & HOST_USER_GID needs to be set!"; exit 100 -fi - -useradd \ - --uid ${HOST_USER_ID} \ - --gid ${HOST_USER_GID} \ - --create-home \ - --shell /bin/bash \ - ${HOST_USER_NAME} -groupadd --gid "${HOST_USER_GID}" "${HOST_USER_NAME}" -usermod -aG sudo ${HOST_USER_NAME} -sleep 5s - -echo ${HOST_USER_NAME}:${HOST_USER_NAME} | chpasswd - -exec su - "${HOST_USER_NAME}" - diff --git a/lcpubsh/image_template/user_mapping.sh b/lcpubsh/image_template/user_mapping.sh new file mode 120000 index 0000000..e51feef --- /dev/null +++ b/lcpubsh/image_template/user_mapping.sh @@ -0,0 +1 @@ +../bin/user_mapping.sh \ No newline at end of file -- cgit v1.2.3