From 2488d6acf18ed9ddfd14070719ff51f3d4d807f2 Mon Sep 17 00:00:00 2001 From: Stavros Vagionitis Date: Fri, 14 Feb 2020 09:59:46 +0000 Subject: [PATCH] mosquitto.service: mosquitto starts even if the network is offline This patch changes the behavior of how mosquitto is starting using systemd. Currently it is starting only when the network is online, meaning that the network is configured to a routable IP address. With this patch, mosquitto is starting when the network is offline, does not need to be configured. This is needed because the MQTT broker might be used as an internal message bus which does not need the network to be online. Signed-off-by: Stavros Vagionitis --- service/systemd/mosquitto.service.notify | 4 ++-- service/systemd/mosquitto.service.simple | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service/systemd/mosquitto.service.notify b/service/systemd/mosquitto.service.notify index d409887d..584a1101 100644 --- a/service/systemd/mosquitto.service.notify +++ b/service/systemd/mosquitto.service.notify @@ -1,8 +1,8 @@ [Unit] Description=Mosquitto MQTT v3.1/v3.1.1 Broker Documentation=man:mosquitto.conf(5) man:mosquitto(8) -After=network-online.target -Wants=network-online.target +After=network.target +Wants=network.target [Service] Type=notify diff --git a/service/systemd/mosquitto.service.simple b/service/systemd/mosquitto.service.simple index 71ab4c16..4346ea14 100644 --- a/service/systemd/mosquitto.service.simple +++ b/service/systemd/mosquitto.service.simple @@ -1,8 +1,8 @@ [Unit] Description=Mosquitto MQTT v3.1/v3.1.1 Broker Documentation=man:mosquitto.conf(5) man:mosquitto(8) -After=network-online.target -Wants=network-online.target +After=network.target +Wants=network.target [Service] ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf