]>
Commit | Line | Data |
---|---|---|
399d20ea FP |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | # first arg is `-f` or `--some-option` | |
5 | # or first arg is `something.conf` | |
6 | if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then | |
7 | set -- npm "$@" | |
8 | fi | |
9 | ||
10 | # allow the container to be started with `--user` | |
11 | if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then | |
12 | chown -R peertube: /data | |
13 | exec gosu peertube "$0" "$@" | |
14 | fi | |
15 | ||
16 | exec "$@" |