netmaker/docker/wait.sh

19 lines
328 B
Bash
Raw Normal View History

#!/bin/ash
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
}
main(){
2023-02-07 21:01:57 +08:00
encrypt_password
echo "Starting MQ..."
# Run the main container command.
/docker-entrypoint.sh
/usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
}
2023-02-07 21:09:54 +08:00
main "${@}"