]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - support/docker/production/entrypoint.sh
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / support / docker / production / entrypoint.sh
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4
5find /config ! -user peertube -exec chown peertube:peertube {} \; || true
6
7# first arg is `-f` or `--some-option`
8# or first arg is `something.conf`
9if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
10 set -- node "$@"
11fi
12
13# allow the container to be started with `--user`
14if [ "$1" = 'node' -a "$(id -u)" = '0' ]; then
15 find /data ! -user peertube -exec chown peertube:peertube {} \;
16 exec gosu peertube "$0" "$@"
17fi
18
19exec "$@"