Pulse/docker-entrypoint.sh
Pulse Monitor 1aadd9dc0a Remove PBS summary card and fix backup chart timezone
- Removed PBS summary card from Dashboard and Backups tabs (not needed)
- Fixed backup frequency chart to use local timezone instead of UTC
- Chart now properly includes today in the date range
- Dates display according to user's browser timezone
2025-08-08 15:30:28 +00:00

44 lines
No EOL
1.2 KiB
Bash

#!/bin/sh
set -e
# Default UID/GID if not provided
PUID=${PUID:-1000}
PGID=${PGID:-1000}
# Only adjust permissions if running as root
if [ "$(id -u)" = "0" ]; then
echo "Starting with UID: $PUID, GID: $PGID"
# Create group if it doesn't exist
if ! getent group pulse >/dev/null 2>&1; then
addgroup -g "$PGID" pulse
else
# Modify existing group GID if different
current_gid=$(getent group pulse | cut -d: -f3)
if [ "$current_gid" != "$PGID" ]; then
delgroup pulse 2>/dev/null || true
addgroup -g "$PGID" pulse
fi
fi
# Create user if it doesn't exist
if ! id -u pulse >/dev/null 2>&1; then
adduser -D -u "$PUID" -G pulse pulse
else
# Modify existing user UID if different
current_uid=$(id -u pulse)
if [ "$current_uid" != "$PUID" ]; then
deluser pulse 2>/dev/null || true
adduser -D -u "$PUID" -G pulse pulse
fi
fi
# Fix ownership of data directory
chown -R pulse:pulse /data /app /etc/pulse
# Switch to pulse user
exec su-exec pulse "$@"
else
# Not running as root, just exec the command
exec "$@"
fi