Files
meshing-around/etc/mesh_bot.tmp
SpudGunMan 22f63e1056 cleanup
2024-09-25 22:56:01 -07:00

26 lines
534 B
Plaintext

# /etc/systemd/system/mesh_bot.service
# sudo systemctl daemon-reload
# sudo systemctl start mesh_bot.service
[Unit]
Description=MESH-BOT
After=network.target
[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/dir/
ExecStart=python3 mesh_bot.py
ExecStop=pkill -f mesh_bot.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