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

Changes in check for systemd #269

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

Conversation

DFolchA
Copy link
Contributor

@DFolchA DFolchA commented Aug 23, 2019

Hello team,

This PR closes #14, I have changed how the post-installation script checked if systemd and its functions were available, from checking whether the /run/systemd/system directory existed to verifying if systemd is being used to initiate the system.

I have generated packages and tested them in:

  • Ubuntu 14
  • Ubuntu 16
  • Ubuntu 18

Regards,
Daniel Folch

@okynos okynos removed the request for review from alguacilaguamara November 25, 2019 17:33
@@ -138,7 +138,7 @@ case "$1" in

# Service
if [ -f /etc/init.d/wazuh-agent ]; then
if [ -d /run/systemd/system ]; then
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: what about to use:
if [ ! -z "$(file /sbin/init |grep 'systemd')" ]; then
instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6765088

@@ -22,7 +22,8 @@ case "$1" in
rm -rf ${WAZUH_TMP_DIR}
fi

if [ -d /run/systemd/system ] ; then

if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6765088

@@ -339,7 +339,7 @@ case "$1" in

# Service
if [ -x /etc/init.d/wazuh-manager ]; then
if [ -d /run/systemd/system ]; then
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6765088

@@ -27,7 +27,7 @@ case "$1" in



if [ -d /run/systemd/system ] ; then
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6765088

Copy link
Contributor

@alberpilot alberpilot left a comment

Choose a reason for hiding this comment

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

Please review the comments. On the other hand, please update the currents specs and pull your branch.

@DFolchA
Copy link
Contributor Author

DFolchA commented Jan 24, 2020

Hello team,

I implemented the requested changes and tested the package generated from the new specs in ubuntu 14 LTS with the /run/systemd/system directory present but no systemctl command.

I have also tested it on a default Ubuntu 14 LTS, Ubuntu 16 LTS, and Ubuntu 18 LTS

Regards,
Daniel Folch

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

Successfully merging this pull request may close these issues.

Unable to install wazuh-agent on Ubuntu 14.04
2 participants