Browse Source

adding some markup details for the commands in the readme

master
mb 5 years ago
parent
commit
936780f773
  1. 29
      README.md

29
README.md

@ -23,7 +23,7 @@ The idea is that you create a single python file (bot.py) and using the `slixmpp
If you want to play around with the streambot/logbot, run the following and answer the questions:
$ python3 streambot.py
`$ python3 streambot.py`
# how to run a bot on the varia systers server
@ -31,9 +31,11 @@ If you want to play around with the streambot/logbot, run the following and answ
Clone the bots repository, either over https or ssh:
$ git clone https://git.vvvvvvaria.org/varia/bots
`$ git clone https://git.vvvvvvaria.org/varia/bots`
$ git clone ssh://gitea@vvvvvvaria.org:12345/varia/bots.git
or with ssh:
`$ git clone ssh://gitea@vvvvvvaria.org:12345/varia/bots.git`
Add your bot python script to the folder.
@ -43,18 +45,19 @@ If your bot uses any dependencies, add them to the `requirements.txt` file in th
Push the changes you made to the server.
$ git add yourfiles.py
`$ git add yourfiles.py`
or
$ git add -A (but be sure you want to add all the files you added to the repo)
`$ git add -A` (but be sure you want to add all the files you added to the repo)
$ git commit -m "your commit message" (something actually informative is best)
`$ git commit -m "your commit message"` (something actually informative is best)
$ git push
`$ git push`
You can also check the status of your repository by typing
$ git status
`$ git status`
After your push, a git hook is pulling the changes: the `bots` folder on the server (which sits at `/srv/gitea/clones/varia/bots`) is updated.
@ -68,13 +71,13 @@ There is a "bots" config file, where you can add your new bot to.
To do this, log into the server hehe:
$ ssh username@vvvvvvaria.org -p 12345
`$ ssh username@vvvvvvaria.org -p 12345`
Open the config file, either with your own user, or as the systers user (has sudo rights!):
$ sudo su systers
`$ sudo su systers`
$ sudo nano /etc/supervisor/conf.d/bots.conf
`$ sudo nano /etc/supervisor/conf.d/bots.conf`
Copy/paste one of the other bot's details and add a new one to this file. This is how the details of the pub.club bot look like:
@ -89,11 +92,11 @@ priority = 999
Save and exit!
CTRL+X Y [enter]
`CTRL+X Y [enter]`
Now, we need to restart supervisor itself, in order to activate these changes to the config:
$ sudo service supervisor restart
`$ sudo service supervisor restart`
It will activate all the bots! And hopefully they work!!

Loading…
Cancel
Save