Explorar el 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 hace 6 años
padre
commit
f6c6eb3a01
Se han modificado 1 ficheros con 3 adiciones y 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