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 1e09f1b0a4..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,6 +1,7 @@ [Unit] Description=OSSEC service for agent -After=network.target +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 af0747e549..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,6 +1,7 @@ [Unit] Description=OSSEC service -After=network.target +Wants=network-online.target +After=network.target network-online.target [Service] Type=forking