ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
464 B

  1. #!/bin/sh
  2. set -e
  3. find /config ! -user peertube -exec chown peertube:peertube {} \; || true
  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 -- node "$@"
  8. fi
  9. # allow the container to be started with `--user`
  10. if [ "$1" = 'node' -a "$(id -u)" = '0' ]; then
  11. find /data ! -user peertube -exec chown peertube:peertube {} \;
  12. exec gosu peertube "$0" "$@"
  13. fi
  14. exec "$@"