installerChange

This commit is contained in:
SpudGunMan
2024-07-10 15:45:57 -07:00
parent be617d5c4a
commit 84b8daeec4
4 changed files with 13 additions and 3 deletions

3
.gitignore vendored
View File

@@ -3,3 +3,6 @@ bbsdb.pkl
# virtualenv
venv/
# modified .service files
etc/*.service

View File

@@ -1,13 +1,13 @@
# /etc/systemd/system/meshbot.service
# /etc/systemd/system/mesh_bot.service
# sudo systemctl daemon-reload
# sudo systemctl start meshbot.service
# sudo systemctl start mesh_bot.service
[Unit]
Description=MESH-BOT
After=network.target
[Service]
ExecStart=/usr/bin/python /usr/local/meshing-around/mesh_bot.py
ExecStart=/usr/bin/python /dir/launch.sh mesh
# Disable Python's buffering of STDOUT and STDERR, so that output from the
# service shows up immediately in systemd's logs

View File

@@ -35,6 +35,13 @@ read bot
# reminder to change the .service file to proper path for the bot
#set the correct path in the service file
program_path="$(dirname "$0")"
cp etc/pong_bot.service.tmp etc/pong_bot.service
cp etc/mesh_bot.service.tmp etc/mesh_bot.service
sed -i "s|/dir/launch.sh|$program_path/launch.sh|g" etc/pong_bot.service
sed -i "s|/dir/launch.sh|$program_path/launch.sh|g" etc/mesh_bot.service
if [ $bot == "pong" ]; then
# install service for pong bot
sudo cp etc/pong_bot.service /etc/systemd/system/