Skip to content

Commit dc983ed

Browse files
committed
mosquitto mkuser script now signals mosquitto to reload the password file
set container and hostname on shairport-sync changed snapserver base image
1 parent 932a3db commit dc983ed

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

mosquitto/bin/mkuser.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ fi
1414
export USER=$1
1515
export PASSWORD=`pwgen 24 1`
1616

17-
echo "Will create this user:"
17+
echo "Creating this user:"
1818
echo
1919
echo "username: ${USER}"
2020
echo "password: ${PASSWORD}"
2121
echo "broker: mosquitto"
2222
echo "port: 1883"
2323
echo "url: mqtt://${USER}:${PASSWORD}@mosquitto:1883"
2424
echo
25-
echo "Only usable from within a hackstack container. To use externally, replace 'mosquitto' with the name or IP address of this server"
25+
echo "Only usable from within a hackstack container. To use externally, replace 'mosquitto' with the name or IP address or name of this server"
2626

2727
echo "creating user:"
2828
CMD="docker compose -f ../docker-compose.yml exec mosquitto mosquitto_passwd -b /mosquitto/data/mos_passwd ${USER} ${PASSWORD}"
@@ -33,3 +33,10 @@ else
3333
echo "failed"
3434
fi
3535

36+
echo "force Mosquitto to reload password file"
37+
CMD="docker compose -f ../docker-compose.yml exec mosquitto pkill -1 mosquitto"
38+
if $CMD ; then
39+
echo "successful"
40+
else
41+
echo "failed"
42+
fi

0 commit comments

Comments
 (0)