Skip to content

Commit

Permalink
Merge pull request #732 from Paraphraser/20231009-mosquitto-master
Browse files Browse the repository at this point in the history
2023-10-09 Mosquitto entry-point script - master branch - PR 1 of 2
  • Loading branch information
Slyke authored Oct 9, 2023
2 parents e3496cd + 627e879 commit e820f56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .templates/mosquitto/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/ash
set -e

PWFILE="/mosquitto/pwfile/pwfile"

# Set permissions
user="$(id -u)"
if [ "$user" = '0' -a -d "/mosquitto" ]; then
Expand All @@ -9,8 +11,13 @@ if [ "$user" = '0' -a -d "/mosquitto" ]; then

rsync -arpv --ignore-existing /${IOTSTACK_DEFAULTS_DIR}/ "/mosquitto"

# general ownership assuming mode as set in template
chown -Rc mosquitto:mosquitto /mosquitto

# specific requirements for the password file
chown -c root:root "$PWFILE"
chmod -c 600 "$PWFILE"

echo "[IOTstack] end self-repair"

fi
Expand Down

0 comments on commit e820f56

Please sign in to comment.