1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
077eec64ee fix(rebuild): shellcheck warnings
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 14:49:13 +02:00
379876f4f6 add support for creation of user/groups 2022-09-15 14:48:09 +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