1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 10:15:22 +00:00

Autostart ircbot if irc_alert is set to true

This will ensure that the irc-bot is started if irc_alert is configured.
This commit is contained in:
Olen 2022-10-18 19:17:34 +02:00 committed by GitHub
parent e35fa8e600
commit 693c446b73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,3 +109,14 @@ with-contenv
/usr/sbin/snmpd -f -c /etc/snmp/snmpd.conf
EOL
chmod +x /etc/services.d/snmpd/run
mkdir -p /etc/services.d/ircbot
cat >/etc/services.d/ircbot/run <<EOL
#!/usr/bin/with-contenv sh
if [ $(lnms config:get irc_alert) == "true" ]; then
s6-setuidgid 1000:992
/opt/librenms/irc.php
fi
sleep 60
EOL
chmod +x /etc/services.d/ircbot/run