mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-06 02:52:07 +08:00
17 lines
266 B
Bash
Executable File
17 lines
266 B
Bash
Executable File
#!/bin/ash
|
|
set -e
|
|
|
|
# Set permissions
|
|
user="$(id -u)"
|
|
if [ "$PUID" = "" ]; then
|
|
PUID="mosquitto"
|
|
fi
|
|
if [ "$PGID" = "" ]; then
|
|
PGID="mosquitto"
|
|
fi
|
|
if [ "$user" = '0' ]; then
|
|
[ -d "/mosquitto/data" ] && chown -R ${PUID}:${PGID} /mosquitto/data || true
|
|
fi
|
|
|
|
exec "$@"
|