Name: thevoxfox
Owner: Vox Pupuli
Description: null
Created: 2016-11-18 16:31:31.0
Updated: 2016-11-18 20:01:44.0
Pushed: 2017-10-04 20:51:41.0
Homepage: null
Size: 105
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
We provide a basic config file, it is located at config.example.ini. Please rename it to config.ini
Note that python packages for this are 'pinned' in requirements.txt
pip3 install -r ./requirements.txt
ualenv --python=/usr/bin/python3 venv
ce venv/bin/activate
install -r ./requirements.txt
If you decide to do this in Docker, local installation is not necessary.
./run.sh SomeLocalContainerName
will start a local python:3 container, mount the repo into /usr/src/legobot, install deps, and then run the chatbot.py script.
If you don't use virtualenv you can directly start the bot:
on3 chatbot.py
In case of virtualenv you first have to activate it:
ce venv/bin/activate
on3 chatbot.py
We can create a systemd service file in the namespace of our linux user, which doesn't require any root priviledges. This allows us to easily utilize systemd features. Create the directory:
r -p ~/.config/systemd/user
After that, create a thevoxfox.service file in it with the following content (it assumes that you cloned this repository into your home directory, please replace $USER with your actual username):
t]
ription=TheVoxFox IRC Bot
r=network.target
vice]
ingDirectory=/home/$USER/thevoxfox
Start=/home/$USER/thevoxfox/venv/bin/python3 /home/$USER/thevoxfox/chatbot.py
ateTmp=true
tall]
edBy=default.target
You can now start/stop/restart/status the bot with:
emctl --user start thevoxfox
emctl --user status thevoxfox
emctl --user restart thevoxfox
emctl --user restart thevoxfox
If you want the service to start at boot and run when logged out:
loginctl enable-linger $USER
You can run it persistently with:
emctl --user enable thevoxfox
Use the config.ini to provide settings to the chatbot.py script
See this link