Skip to content

Commit

Permalink
added optional FAIL_FAST env - fix for #139
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvAmBass committed Sep 22, 2024
1 parent d6696dc commit 1d804a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ _all of those variants are automatically build and generated in one go_

* 2024-09-22
* fixed filename handling for names with special chars
* `mangled names = no; dos charset = CP850; unix charset = UTF-8`
* `mangled names = no; dos charset = CP850; unix charset = UTF-8`
* added new environment variable to `FAIL_FAST` on user/group creation/errors/conflicts (#139)
* 2024-07-05
* improved github workflow - don't fail if it just skipped the build.
* sign images with cosign
Expand Down Expand Up @@ -159,6 +160,10 @@ If you experience Problems, take a look at this file: [TROUBLESHOOTING.md](TROUB
* _default:_ `TimeCapsule`
* some available options are `Xserve`, `PowerBook`, `PowerMac`, `Macmini`, `iMac`, `MacBook`, `MacBookPro`, `MacBookAir`, `MacPro`, `MacPro6,1`, `MacPro7,1` (Tower), `MacPro7,1@ECOLOR=226,226,224` (Rack), `TimeCapsule`, `AppleTV1,1` and `AirPort`.

* __FAIL\_FAST__
* _optional_ currently only fails fast if there are conflicts/errors during user/group creation
* default not set - set to any value to enable

* __AVAHI\_NAME__
* _optional_ name of avahi samba service
* _default:_ _hostname_
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

# docker-compose.yml example for https://github.com/ServerContainers/samba

services:
Expand All @@ -14,6 +12,9 @@ services:
#cap_add:
# - CAP_NET_ADMIN
environment:
# uncomment to enable fail fast (currently only fails fast if there are conflicts/errors during user/group creation)
#FAIL_FAST: 1

MODEL: 'TimeCapsule'
AVAHI_NAME: StorageServer

Expand Down
7 changes: 7 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ if [ ! -f "$INITALIZED" ]; then
echo ' '"$CONF_KEY_VALUE"' = '"$CONF_CONF_VALUE" >> /etc/samba/smb.conf
done

# FAIL FAST START
[ ! -z ${FAIL_FAST+x} ] && set -e

##
# Create GROUPS
##
Expand Down Expand Up @@ -149,6 +152,10 @@ if [ ! -f "$INITALIZED" ]; then
unset $(echo "$I_ACCOUNT" | cut -d'=' -f1)
done

[ ! -z ${FAIL_FAST+x} ] && set +e
# FAIL FAST END


echo '' >> /etc/samba/smb.conf

##
Expand Down

0 comments on commit 1d804a2

Please sign in to comment.