Skip to content

Unable to install wazuh-agent on Ubuntu 14.04 #14

Open
@ston1th

Description

@ston1th

We have installed some systemd stuff on our Ubuntu 14.04 but we are still using the old upstart as init system.
The postinst script will try to use systemctl to enable the wazuh agent if the systemd directory /run/systemd/system exists:

# Service
if [ -f /etc/init.d/wazuh-agent ]; then
if [ -d /run/systemd/system ]; then
systemctl enable wazuh-agent > /dev/null 2>&1
fi
update-rc.d wazuh-agent defaults > /dev/null 2>&1
fi

This call fails:

# systemctl enable wazuh-agent
Failed to issue method call: No such file or directory

Could we add another test to check if we still run with upstart?
Something like:

if [ -d /run/systemd/system ] && [[ ! `/sbin/init --version 2>/dev/null` =~ upstart ]]; then

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions