2022-09-27 20:06:33 +08:00
|
|
|
#!/bin/ash
|
2022-09-26 19:23:32 +08:00
|
|
|
|
2023-02-07 21:01:57 +08:00
|
|
|
encrypt_password() {
|
2023-02-08 00:34:38 +08:00
|
|
|
echo "${MQ_USERNAME}:${MQ_PASSWORD}" > /mosquitto/password.txt
|
|
|
|
mosquitto_passwd -U /mosquitto/password.txt
|
2022-09-26 19:23:32 +08:00
|
|
|
}
|
|
|
|
|
2022-09-27 20:06:33 +08:00
|
|
|
main(){
|
2023-02-07 21:01:57 +08:00
|
|
|
|
|
|
|
encrypt_password
|
2022-09-27 20:06:33 +08:00
|
|
|
echo "Starting MQ..."
|
|
|
|
# Run the main container command.
|
|
|
|
/docker-entrypoint.sh
|
|
|
|
/usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
|
|
|
|
|
2022-09-26 19:23:32 +08:00
|
|
|
}
|
|
|
|
|
2023-02-07 21:09:54 +08:00
|
|
|
main "${@}"
|