We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 916155f commit c127be7Copy full SHA for c127be7
metro-ai-suite/smart-nvr/charts/subchart/mqtt-broker/templates/deployment.yaml
@@ -90,8 +90,11 @@ spec:
90
- sh
91
- -c
92
- |
93
- touch {{ .Values.auth.passwordFilePath }} && \
94
- mosquitto_passwd -c -b {{ .Values.auth.passwordFilePath }} $${MQTT_USER} $${MQTT_PASSWORD} && \
+ if [ ! -f {{ .Values.auth.passwordFilePath }} ]; then
+ mosquitto_passwd -c -b {{ .Values.auth.passwordFilePath }} $${MQTT_USER} $${MQTT_PASSWORD}
95
+ else
96
+ mosquitto_passwd -b {{ .Values.auth.passwordFilePath }} $${MQTT_USER} $${MQTT_PASSWORD}
97
+ fi && \
98
chmod 0700 {{ .Values.auth.passwordFilePath }} && \
99
chown {{ $runUser }}:{{ $runGroup }} {{ .Values.auth.passwordFilePath }} && \
100
mosquitto -c /mosquitto/config/mosquitto.conf
0 commit comments