Matthias Andreas Benkard | 12397aa | 2021-08-17 21:02:00 +0200 | [diff] [blame^] | 1 | #! /bin/sh |
| 2 | |
| 3 | set -eux |
| 4 | |
| 5 | SMBCONF=/vol/samba-config/smb.conf |
| 6 | SMBPASSWD=/vol/samba-smbpasswd/smbpasswd |
| 7 | SSHDCONF=/vol/sshd-config |
| 8 | |
| 9 | # --- sshd --- |
| 10 | cp -pL "$SSHDCONF"/* /etc/ssh/ |
| 11 | chown -R sshd:sshd /etc/ssh |
| 12 | mkdir -p /var/empty |
| 13 | |
| 14 | # --- Samba --- |
| 15 | cp -pL "$SMBPASSWD" /var/lib/samba/private/ |
| 16 | cp -pL "$SMBCONF" /var/lib/samba/ |
| 17 | |
| 18 | cut -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 |
| 21 | done |
| 22 | |
| 23 | exec s6-svscan /service |