#!/bin/sh #addgroup --gid ${GID} peertube && adduser --disabled-password --shell /bin/sh --gid ${GID} --uid ${UID} --gecos "" peertube groupadd -g ${GID} peertube && useradd -u ${UID} -M -g ${GID} peertube cd /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}'|' /PeerTube/config/production.yaml sed -i -e 's||'${BODY_SIZE}'|' /etc/nginx/sites-enabled/peertube.conf chown -R $UID:$GID ./ #npm start if [ $# -eq 0 ]; then su - peertube -c "NODE_ENV=production npm start" else su - peertube -c "NODE_ENV=production npm $#" fi