20 lines
546 B
Desktop File
20 lines
546 B
Desktop File
[Unit]
|
|
Description=MQTT Pilot Service
|
|
After=network.target
|
|
# Ajouter un délai après le démarrage du réseau
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
[Service]
|
|
Type=simple
|
|
User=gilles
|
|
# Délai avant de démarrer le service
|
|
ExecStartPre=/bin/sleep 30
|
|
ExecStart=/home/gilles/pilot/monenv/bin/python3 /home/gilles/pilot/main_prog.py
|
|
Restart=on-failure
|
|
RestartSec=30
|
|
ExecStopPost=/home/gilles/pilot/monenv/bin/python3 /home/gilles/pilot/mqtt_unvai.py
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
[Install]
|
|
WantedBy=multi-user.target
|