Explorar o código

Add network.target to service definition (#98)

In order to avoid a failure during boot we need to use the network.target, for example, when the mqtt server is not installed in the same computer.
Juan Manuel Servera %!s(int64=6) %!d(string=hai) anos
pai
achega
f6c6eb3a01
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      template.service

+ 3 - 1
template.service

@@ -1,7 +1,7 @@
 [Unit]
 Description=Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
 Documentation=https://github.com/ThomDietrich/miflora-mqtt-daemon
-After=bluetooth.service mosquitto.service
+After=network.target bluetooth.service mosquitto.service
 
 [Service]
 Type=notify
@@ -10,6 +10,8 @@ Group=daemon
 WorkingDirectory=/opt/miflora-mqtt-daemon/
 ExecStart=/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py
 StandardOutput=null
+#StandardOutput=syslog
+#SyslogIdentifier=miflora
 StandardError=journal
 Environment=PYTHONUNBUFFERED=true
 Restart=always