Files
tsun-gen3-proxy/app/entrypoint.sh
2023-10-01 21:26:53 +02:00

16 lines
428 B
Bash

#!/bin/sh
set -e
user="$(id -u)"
echo "######################################################"
echo "# start: '$SERVICE_NAME' Version:$VERSION"
echo "# with UserID:$UID, GroupID:$GID"
echo "######################################################"
if [ "$user" = '0' ]; then
[ -d "/home/$SERVICE_NAME" ] && chown -R $SERVICE_NAME:$SERVICE_NAME /home/$SERVICE_NAME || true
exec gosu $SERVICE_NAME "$@"
else
exec "$@"
fi