Skip to content

Commit

Permalink
Sync docker-entrypoint.sh with enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jan 24, 2024
1 parent 565e517 commit 6b9b6f4
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,7 @@ readonly gid
readonly exec_cmd

if [[ "$(id -u)" = "0" ]]; then
chown "${uid}":"${gid}" /opt/hivemq/data
chmod 700 /opt/hivemq/data
# Any of the following may fail but still allow HiveMQ to start normally, so lets ignore errors
set +e
chown "${uid}":"${gid}" /opt/hivemq
chown "${uid}":"${gid}" /opt/hivemq-*
chown "${uid}":"${gid}" /opt/hivemq/log
chown "${uid}":"${gid}" /opt/hivemq/conf
chown "${uid}":"${gid}" /opt/hivemq/conf/config.xml
# Recursive for bin, no volume here
chown -R "${uid}":"${gid}" /opt/hivemq/bin
chmod 700 /opt/hivemq
chmod 700 /opt/hivemq-*
chmod -R 700 /opt/hivemq/bin
find /opt \! -user "${uid}" -exec chown "${uid}" '{}' + || true
fi

${exec_cmd} "$@"

0 comments on commit 6b9b6f4

Please sign in to comment.