From fb9dee9efee7f832c7c95fab2d066fb3606b1fa8 Mon Sep 17 00:00:00 2001 From: Kevin Olbrich Date: Thu, 8 Nov 2018 14:26:27 +0100 Subject: [PATCH] pkg/kamailio/deb: wait for network to be up Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service. https://www.freedesktop.org/software/systemd/man/systemd.special.html https://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html Signed-off-by: Kevin Olbrich (cherry picked from commit f7867838eb8a68a9ae4c00f2487bdec078b94c88) --- pkg/kamailio/deb/bionic/kamailio.service | 3 ++- pkg/kamailio/deb/buster/kamailio.service | 3 ++- pkg/kamailio/deb/debian/kamailio.service | 3 ++- pkg/kamailio/deb/jessie/kamailio.service | 3 ++- pkg/kamailio/deb/sid/kamailio.service | 3 ++- pkg/kamailio/deb/stretch/kamailio.service | 3 ++- pkg/kamailio/deb/xenial/kamailio.service | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pkg/kamailio/deb/bionic/kamailio.service b/pkg/kamailio/deb/bionic/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/bionic/kamailio.service +++ b/pkg/kamailio/deb/bionic/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/buster/kamailio.service b/pkg/kamailio/deb/buster/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/buster/kamailio.service +++ b/pkg/kamailio/deb/buster/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/debian/kamailio.service b/pkg/kamailio/deb/debian/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/debian/kamailio.service +++ b/pkg/kamailio/deb/debian/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/jessie/kamailio.service b/pkg/kamailio/deb/jessie/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/jessie/kamailio.service +++ b/pkg/kamailio/deb/jessie/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/sid/kamailio.service b/pkg/kamailio/deb/sid/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/sid/kamailio.service +++ b/pkg/kamailio/deb/sid/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/stretch/kamailio.service b/pkg/kamailio/deb/stretch/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/stretch/kamailio.service +++ b/pkg/kamailio/deb/stretch/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking diff --git a/pkg/kamailio/deb/xenial/kamailio.service b/pkg/kamailio/deb/xenial/kamailio.service index e7a9e184848..99679e3372f 100644 --- a/pkg/kamailio/deb/xenial/kamailio.service +++ b/pkg/kamailio/deb/xenial/kamailio.service @@ -1,6 +1,7 @@ [Unit] Description=Kamailio (OpenSER) - the Open Source SIP Server -After=network.target +Wants=network-online.target +After=network-online.target [Service] Type=forking