blob: ba654d9b69ae196120fe7e62a8f3da89d72f3a4e [file] [log] [blame]
#! /bin/sh
set -eux
SMBCONF=/vol/samba-config/smb.conf
SMBPASSWD=/vol/samba-smbpasswd/smbpasswd
SSHDCONF=/vol/sshd-config
# --- sshd ---
cp -pL "$SSHDCONF"/* /etc/ssh/
chown -R sshd:sshd /etc/ssh
mkdir -p /var/empty
# --- Samba ---
cp -pL "$SMBPASSWD" /var/lib/samba/private/
cp -pL "$SMBCONF" /var/lib/samba/
cut -d: -f1,2 "$SMBPASSWD" | sed 's/:/ /' | while read name id; do
echo "$name::$id:$id::/home/$name:/bin/sh" >>/etc/passwd
echo "$name::$id:" >>/etc/group
done
exec s6-svscan /service