#!/bin/sh #groupadd -g ${GID} peertube && useradd -u ${UID} -M -g ${GID} peertube usermod -u ${GID} peertube groupmod -g ${UID} peertube sed -i -e 's||'${HTTPS}'|' \ -e 's||'${HOSTNAME}'|' \ -e 's||'${PORT}'|' \ -e 's||'${DATABASE_HOST}'|' \ -e 's||'${DATABASE_PORT}'|' \ -e 's||'${DATABASE_USERNAME}'|' \ -e 's||'${DATABASE_PASSWORD}'|' \ -e 's||'${ADMIN_EMAIL}'|' \ -e 's||'${SIGNUP_ENABLE}'|' \ -e 's||'${TRANSCODING_ENABLE}'|' \ -e 's||'${TRANSCODING_THREADS}'|' \ -e 's||'${CACHE_SIZE}'|' \ -e 's||'${SIGNUP_LIMIT}'|' \ -e 's||'${VIDEO_QUOTA}'|' \ -e 's||'${RESOLUTION_280}'|' \ -e 's||'${RESOLUTION_360}'|' \ -e 's||'${RESOLUTION_480}'|' \ -e 's||'${RESOLUTION_720}'|' \ -e 's||'${RESOLUTION_1080}'|' /PeerTube/config/production.yaml sed -i -e 's||'${BODY_SIZE}'|' /etc/nginx/sites-enabled/peertube.conf chown -R $UID:$GID /home/peertube chown -R $UID:$GID /PeerTube nginx if [ $# -eq 0 ]; then exec su-exec peertube:peertube NODE_ENV=production npm start else exec su-exec peertube:peertube NODE_ENV=production npm $# fi