Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autostart ircbot based on environment variable #317

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Olen
Copy link

@Olen Olen commented Oct 18, 2022

This will ensure that the irc-bot is started if the enviroment-variable LIBRENMS_IRC_SERVICE is set to "1".

You still need to enable irc_alert in the config to use the ircbot for alerting.

This will ensure that the irc-bot is started if irc_alert is configured.
@Olen Olen requested a review from crazy-max as a code owner October 18, 2022 17:18
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this service I think we should have a new env var named smth like LIBRENMS_IRC_SERVICE instead of relying on irc_alert config.

rootfs/etc/cont-init.d/04-svc-main.sh Outdated Show resolved Hide resolved
rootfs/etc/cont-init.d/04-svc-main.sh Outdated Show resolved Hide resolved
rootfs/etc/cont-init.d/04-svc-main.sh Outdated Show resolved Hide resolved
- Changed startup to depend on nevironment variable
- Fixed uid/gid
- Shortened final sleep before restart (not sure about this one)
@Olen Olen changed the title Autostart ircbot if irc_alert is set to true Autostart ircbot based on environment variable Nov 18, 2022
@Olen
Copy link
Author

Olen commented Nov 18, 2022

Seems like the bot is unable to send alerts. Possibly because the alerts are triggered by the dispatcher container, which does not have access to the .ircbot.alert file.
I will investigate a bit more.

@Olen
Copy link
Author

Olen commented Nov 18, 2022

This PR needs to be merged to make alerting work in the container based environment.

librenms/librenms#14647

@crazy-max
Copy link
Member

This PR needs to be merged to make alerting work in the container based environment.

librenms/librenms#14647

Moving to draft while waiting for the upstream PR to be merged

@crazy-max crazy-max marked this pull request as draft December 30, 2022 07:57
@murrant
Copy link
Member

murrant commented Apr 28, 2023

Approved upstream, will be in 23.5

@Olen Olen marked this pull request as ready for review June 7, 2023 06:57
@Olen
Copy link
Author

Olen commented Jun 7, 2023

Now that 23.5 has been released. This should be ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants