syncthing/script/docker-entrypoint.sh

12 lines
177 B
Bash
Raw Permalink Normal View History

#!/bin/sh
set -eu
if [ "$(id -u)" = '0' ]; then
chown "${PUID}:${PGID}" "${HOME}" \
&& exec su-exec "${PUID}:${PGID}" \
env HOME="$HOME" "$@"
else
exec "$@"
fi