mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-03-28 17:32:36 +01:00
installerChange
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,3 +3,6 @@ bbsdb.pkl
|
||||
|
||||
# virtualenv
|
||||
venv/
|
||||
|
||||
# modified .service files
|
||||
etc/*.service
|
||||
|
||||
@@ -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
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user