mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-02-03 02:08:12 -05:00
27 lines
496 B
Plaintext
Executable File
27 lines
496 B
Plaintext
Executable File
#!/command/with-contenv bash
|
|
# shellcheck shell=bash
|
|
|
|
set -e
|
|
|
|
. /bin/common.sh
|
|
|
|
if [ "$(is_true "$DEBUG")" = '1' ]; then
|
|
set -x
|
|
fi
|
|
|
|
log_info 'Starting backend ...'
|
|
|
|
if [ "$(is_true "$DEVELOPMENT")" = '1' ]; then
|
|
HOME=$NPMHOME
|
|
GOPATH="$HOME/go"
|
|
mkdir -p "$GOPATH"
|
|
chown -R "$PUID:$PGID" "$GOPATH"
|
|
export HOME GOPATH
|
|
rm -rf /app/backend/.task
|
|
cd /app/backend || exit 1
|
|
exec s6-setuidgid "$PUID:$PGID" task -w
|
|
else
|
|
cd /app/bin || exit 1
|
|
exec s6-setuidgid "$PUID:$PGID" /app/bin/server
|
|
fi
|