1
Fork 0
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
samba-with-avahi/entrypoint.sh

16 lines
383 B
Bash

#!/usr/bin/env bash
while IFS='=' read -r name value ; do
if [[ $name == 'USER'* ]]; then
IFS=';'
read -ra userParams <<< "${!name}"
echo "Adding user ${userParams[0]}"
adduser --no-create-home --uid "${userParams[2]}" --ingroup "${userParams[1]}" \
--disabled-password "${userParams[0]}"
fi
done < <(env)
nmbd -D
avahi-daemon &
smbd -FS --no-process-group