Skip to content

Commit 900a302

Browse files
authored
Merge pull request SensorsIot#733 from Paraphraser/20231009-mosquitto-old-menu
2023-10-09 Mosquitto entry-point script - old-menu branch - PR 2 of 2
2 parents 64c6270 + 2f66253 commit 900a302

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.templates/mosquitto/docker-entrypoint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/ash
22
set -e
33

4+
PWFILE="/mosquitto/pwfile/pwfile"
5+
46
# Set permissions
57
user="$(id -u)"
68
if [ "$user" = '0' -a -d "/mosquitto" ]; then
@@ -9,8 +11,13 @@ if [ "$user" = '0' -a -d "/mosquitto" ]; then
911

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

14+
# general ownership assuming mode as set in template
1215
chown -Rc mosquitto:mosquitto /mosquitto
1316

17+
# specific requirements for the password file
18+
chown -c root:root "$PWFILE"
19+
chmod -c 600 "$PWFILE"
20+
1421
echo "[IOTstack] end self-repair"
1522

1623
fi

0 commit comments

Comments
 (0)