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

feat(command): Enable the datacollector service when disabled #7

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

JPLachance
Copy link
Contributor

feat(command): Enable the datacollector service when disabled
fix(command): Improve Kubernetes nodes detection

When pre-installing the Lacework agent on an image, the Lacework support team suggests we disable the datacollector service. Therefore, this script needs to enable it.

Signed-off-by: Jean-Philippe Lachance jplachance@coveo.com

fix(command): Improve Kubernetes nodes detection

When pre-installing the Lacwork agent on an image, the Lacework support team suggests we disable the datacollector service. Therefore, this script needs to enable it.

Signed-off-by: Jean-Philippe Lachance <jplachance@coveo.com>
# Make sure the Lacework datacollector service is enabled and running
if ! systemctl is-active --quiet datacollector; then
echo "Enabling the Lacework datacollector service"
systemctl enable datacollector
Copy link
Contributor

Choose a reason for hiding this comment

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

what if the service is enabled but not active? would this fail? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen Shot 2021-03-02 at 2 17 20 PM

I just did the test, I confirm I confirm enabling an already enabled service does not cause any issue.

Copy link
Contributor

@afiune afiune left a comment

Choose a reason for hiding this comment

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

tenor-167237101

@afiune afiune closed this Mar 2, 2021
@afiune afiune reopened this Mar 2, 2021
@afiune afiune merged commit 8578d5f into lacework:main Mar 2, 2021
@afiune afiune mentioned this pull request Mar 2, 2021
@JPLachance JPLachance deleted the feat-enable-disabled-service branch March 5, 2021 16:46
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.

2 participants