From 383102802b71e338b5540730d8fffdc726bda66d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Thu, 3 Oct 2024 11:03:38 -0700 Subject: [PATCH] Create mesh_bot_w3.tmp --- etc/mesh_bot_w3.tmp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 etc/mesh_bot_w3.tmp diff --git a/etc/mesh_bot_w3.tmp b/etc/mesh_bot_w3.tmp new file mode 100644 index 0000000..1e01f2f --- /dev/null +++ b/etc/mesh_bot_w3.tmp @@ -0,0 +1,25 @@ +# /etc/systemd/system/mesh_bot.service +# sudo systemctl daemon-reload +# sudo systemctl start mesh_bot.service + +[Unit] +Description=MESH-BOT-Reporting +After=network.target + +[Service] +Type=simple +User=pi +Group=pi +WorkingDirectory=/dir/ +ExecStart=python3 logs/mesh_network_analyzer.py +ExecStop=pkill -f mesh_network_analyzer.py + +# Disable Python's buffering of STDOUT and STDERR, so that output from the +# service shows up immediately in systemd's logs +Environment=PYTHONUNBUFFERED=1 + +Restart=on-failure +Type=notify #try simple if any problems + +[Install] +WantedBy=default.target