diff options
Diffstat (limited to 'mutt/entrypoint.sh')
-rwxr-xr-x | mutt/entrypoint.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/mutt/entrypoint.sh b/mutt/entrypoint.sh deleted file mode 100755 index 3196629..0000000 --- a/mutt/entrypoint.sh +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | export TERM=${TERM:-xterm-256color} | ||
6 | export BROWSER=${DOCKER_BROWSER:-elinks} | ||
7 | export EDITOR=${DOCKER_EDITOR:-vim} | ||
8 | |||
9 | USERNAME="mutt" | ||
10 | DATA_DIR="/home/mutt/Mail" | ||
11 | |||
12 | # Default UID/GID to owner of the data directory | ||
13 | PROG_UID=${PROG_UID:-$(stat -L -c "%u" $DATA_DIR)} | ||
14 | PROG_GID=${PROG_GID:-$(stat -L -c "%u" $DATA_DIR)} | ||
15 | |||
16 | if [ "$PROG_GID" = 0 -o "$PROG_GID" = 0 ]; then | ||
17 | echo "Set PROG_UID and PROG_GID in environment" | ||
18 | exit 1 | ||
19 | else | ||
20 | echo "UID/GID: $PROG_UID $PROG_GID" | ||
21 | fi | ||
22 | |||
23 | # Create the user and group | ||
24 | addgroup -g ${PROG_GID} -S ${USERNAME} | ||
25 | adduser -u ${PROG_UID} -S -h /home/${USERNAME} -H -D -G ${USERNAME} ${USERNAME} | ||
26 | |||
27 | # Allow running a shell in the container | ||
28 | /sbin/su-exec ${USERNAME} "$@" | ||