1
0

Compare commits

..

1 Commits

Author SHA1 Message Date
ee9b2257da add support for creation of user/groups
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 14:40:44 +02:00
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
updates_available () { updates_available () {
docker pull "$1" docker pull $1
if test "$(docker run -it --rm "$1" /bin/sh -c 'apt -qqq update && apt -qq list --upgradable')" != ""; then if test "$(docker run -it --rm $1 /bin/sh -c 'apt -qqq update && apt -qq list --upgradable')" != ""; then
return 0 return 0
else else
return 1 return 1

View File

@ -29,7 +29,7 @@ while [ "$GROUPADD" != "$i" ] ;do
GROUP_NAME=${i%%:*} GROUP_NAME=${i%%:*}
GROUP_GID="${i#$GROUP_NAME:}" GROUP_GID="${i#$GROUP_NAME:}"
groupadd --gid "$GROUP_GID" "$GROUP_NAME" groupadd --gid $GROUP_GID $GROUP_NAME
done done
# USERADD="user1:1000:1000;user2:1001:1000;user3:1002:1002" # USERADD="user1:1000:1000;user2:1001:1000;user3:1002:1002"
@ -42,7 +42,7 @@ while [ "$USERADD" != "$i" ] ;do
USER_UID="${UID_GID%%:*}" USER_UID="${UID_GID%%:*}"
USER_GID="${UID_GID#$USER_UID:}" USER_GID="${UID_GID#$USER_UID:}"
useradd --home-dir "$BASE_DIR/$USER_NAME" --uid "$USER_UID" --gid "$USER_GID" "$USER_NAME" useradd --home-dir $BASE_DIR/$USER_NAME --uid $USER_UID --gid $USER_GID $USER_NAME
done done
exec /usr/sbin/sshd -D -e exec /usr/sbin/sshd -D -e