Allow nagios to change ssmtp config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1f05a0d0ed
commit
9ff7bd0781
@ -18,13 +18,13 @@ RUN apk add --no-cache \
|
|||||||
nagios-plugins-ssl_validity \
|
nagios-plugins-ssl_validity \
|
||||||
nagios-web \
|
nagios-web \
|
||||||
nrpe-plugin \
|
nrpe-plugin \
|
||||||
ssmtp
|
ssmtp && \
|
||||||
|
chown nagios /etc/ssmtp/ssmtp.conf
|
||||||
USER nagios
|
|
||||||
|
|
||||||
COPY FREE_send_notification.sh /usr/bin/FREE_send_notification.sh
|
COPY FREE_send_notification.sh /usr/bin/FREE_send_notification.sh
|
||||||
|
|
||||||
COPY entrypoint.sh /docker-entrypoint.sh
|
COPY entrypoint.sh /docker-entrypoint.sh
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER nagios
|
||||||
|
|
||||||
CMD ["/usr/sbin/nagios", "/etc/nagios/nagios.cfg"]
|
CMD ["/usr/sbin/nagios", "/etc/nagios/nagios.cfg"]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ -n "${MAILER_HOST}" ] && sed -r -i "/^mailhub=/s/.*/mailhub=${MAILER_HOST}/" /etc/ssmtp/ssmtp.conf
|
[ -n "${MAILER_HOST}" ] && sed -r "/^mailhub=/s/.*/mailhub=${MAILER_HOST}/" /etc/ssmtp/ssmtp.conf > ~/ssmtp.conf && cat ~/ssmtp.conf > /etc/ssmtp/ssmtp.conf
|
||||||
|
|
||||||
exec $@
|
exec $@
|
||||||
|
Loading…
Reference in New Issue
Block a user