mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-03-28 17:32:36 +01:00
29 lines
663 B
Plaintext
29 lines
663 B
Plaintext
# /etc/systemd/system/mesh_bot.service
|
|
# sudo systemctl daemon-reload
|
|
# sudo systemctl enable mesh_bot.service
|
|
# 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
|
|
Environment=REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
|
|
Environment=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
|
|
|
# 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
|
|
|
|
|
|
[Install]
|
|
WantedBy=default.target
|