blob: ba654d9b69ae196120fe7e62a8f3da89d72f3a4e [file] [log] [blame]
Matthias Andreas Benkard12397aa2021-08-17 21:02:00 +02001#! /bin/sh
2
3set -eux
4
5SMBCONF=/vol/samba-config/smb.conf
6SMBPASSWD=/vol/samba-smbpasswd/smbpasswd
7SSHDCONF=/vol/sshd-config
8
9# --- sshd ---
10cp -pL "$SSHDCONF"/* /etc/ssh/
11chown -R sshd:sshd /etc/ssh
12mkdir -p /var/empty
13
14# --- Samba ---
15cp -pL "$SMBPASSWD" /var/lib/samba/private/
16cp -pL "$SMBCONF" /var/lib/samba/
17
18cut -d: -f1,2 "$SMBPASSWD" | sed 's/:/ /' | while read name id; do
19 echo "$name::$id:$id::/home/$name:/bin/sh" >>/etc/passwd
20 echo "$name::$id:" >>/etc/group
21done
22
23exec s6-svscan /service