Procházet zdrojové kódy

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 před 6 roky
rodič
revize
f6c6eb3a01
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      template.service

+ 3 - 1
template.service

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