mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-03-21 16:07:01 +00:00
feat: Run piped frontend with unprivileged user
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$BACKEND_HOSTNAME" ]; then
|
||||
if [ -z "${BACKEND_HOSTNAME}" ]; then
|
||||
echo "BACKEND_HOSTNAME not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i s/pipedapi.kavin.rocks/"$BACKEND_HOSTNAME"/g /usr/share/nginx/html/assets/*
|
||||
sed -i "s/pipedapi.kavin.rocks/${BACKEND_HOSTNAME}/g" /usr/share/nginx/html/assets/*
|
||||
|
||||
if [ -n "${HTTP_WORKERS}" ]; then
|
||||
sed -i "s/worker_processes auto;/worker_processes ${HTTP_WORKERS};/g" /etc/nginx/nginx.conf
|
||||
fi
|
||||
|
||||
if [ -n "${HTTP_PORT}" ]; then
|
||||
sed -i "s/80;/${HTTP_PORT};/g" /etc/nginx/conf.d/default.conf
|
||||
fi
|
||||
|
||||
nginx -g "daemon off;"
|
||||
|
||||
Reference in New Issue
Block a user