ayaports/user/peertube/peertube-manage.sh

16 lines
308 B
Bash
Raw Permalink Normal View History

2024-01-06 05:54:55 +00:00
#!/bin/sh
BUNDLE_DIR='/usr/share/webapps/peertube'
cd $BUNDLE_DIR
if [ "$(id -un)" != 'peertube' ]; then
source /etc/conf.d/peertube
export NODE_ENV NODE_CONFIG_DIR
exec su peertube -c '"$0" "$@"' -- npm run "$@"
else
source /etc/conf.d/peertube
export NODE_ENV NODE_CONFIG_DIR
exec npm run "$@"
fi