From d51783e8241b55ab03bcba257fe7ba491e7bc221 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 26 Jun 2024 21:29:19 -0700 Subject: [PATCH] RC1 --- README.md | 2 +- mesh_bot.service => etc/mesh_bot.service | 0 {img => etc}/pong-bot.jpg | Bin etc/pong_bot.service | 20 ++++++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) rename mesh_bot.service => etc/mesh_bot.service (100%) rename {img => etc}/pong-bot.jpg (100%) create mode 100644 etc/pong_bot.service diff --git a/README.md b/README.md index 1c5ca1d..69dc874 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Random Mesh Scripts for BBS activities for use with Meshtastic nodes ## pong-bot.sh -![alt text](img/pong-bot.jpg "Example Use") +![alt text](etc/pong-bot.jpg "Example Use") Little bot which will trap keywords like ping and respond on a DM with pong. The script will also monitor the group channels for keywords to trap on. you can also `Ping @Data to Echo` as a example for further processing. diff --git a/mesh_bot.service b/etc/mesh_bot.service similarity index 100% rename from mesh_bot.service rename to etc/mesh_bot.service diff --git a/img/pong-bot.jpg b/etc/pong-bot.jpg similarity index 100% rename from img/pong-bot.jpg rename to etc/pong-bot.jpg diff --git a/etc/pong_bot.service b/etc/pong_bot.service new file mode 100644 index 0000000..dcf49ae --- /dev/null +++ b/etc/pong_bot.service @@ -0,0 +1,20 @@ +# /etc/systemd/system/meshbot.service +# sudo systemctl daemon-reload +# sudo systemctl start meshbot.service + +[Unit] +Description=PONG-BOT +After=network.target + +[Service] +ExecStart=/usr/bin/python /usr/local/meshing-around/pong_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 \ No newline at end of file