diff --git a/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec-agent.service b/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec-agent.service index 71856fc7e4..0028dc11ed 100644 --- a/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec-agent.service +++ b/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec-agent.service @@ -1,5 +1,7 @@ [Unit] Description=OSSEC service for agent +Wants=network-online.target +After=network.target network-online.target [Service] Type=forking diff --git a/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec.service b/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec.service index 550b94ef9b..146bffe846 100644 --- a/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec.service +++ b/install_files/ansible-base/roles/build-ossec-deb-pkg/files/ossec.service @@ -1,5 +1,7 @@ [Unit] Description=OSSEC service +Wants=network-online.target +After=network.target network-online.target [Service] Type=forking