nxy irc bot
Go to file
2017-08-22 19:09:15 +02:00
bot Using env_file var now 2017-08-22 19:01:33 +02:00
files Huge cleanup and refactoring :> 2017-08-22 17:43:48 +02:00
.gitignore Cleanup, fixed some bugs (yt etc) 2017-07-31 15:29:59 +02:00
FORMATTING.md Massive refactoring/-structuring 2017-07-07 02:49:37 +02:00
README.md Updated install instructions 2017-08-22 19:09:15 +02:00
requirements.txt Moved @irc3.plugin into bot.plugins.BasePlugin -> saved some lines 2017-08-22 16:47:10 +02:00
TODOs Fixed bug in rainbow function which breaks output with numbers 2017-08-01 15:50:12 +02:00
tox.ini Updated flake8 settings 2017-08-22 19:02:45 +02:00

Installation

  • Setup pgsql, create user and database, create schema (last step only if you have a dump):
    • psql -U postgres
      • CREATE ROLE nxy WITH ENCRYPTED PASSWORD 'your-password';
      • ALTER ROLE nxy LOGIN;
      • CREATE DATABASE nxy_prod OWNER nxy;
      • \q
    • psql -U nxy -U nxy_prod < nxy/files/schema.sql
    • psql -U nxy -d nxy_prod < path/to/dump.sql
  • Clone repo
    • git clone https://gitfap.de/mrhanky/nxy.git
  • Create virtualenv, activate it and install dependencies
    • python3 -m venv env
    • source env/bin/active
    • pip install -r nxy/requirements.txt
  • Copy nxy/files/config.json and nxy/files/config.json and modify them
    • cp nxy/files/{.env,config.json} .
    • vim .env config.json
  • Enable linger for nxy user (so the user unit starts on boot)
    • sudo loginctl enable-linger nxy
  • Link systemd unit, enable and run it
    • mkdir -p $HOME/.config/systemd/user
    • ln -fs $HOME/nxy/files/nxy-bot.service $HOME/.config/systemd/user
    • systemctl --user daemon-reload
    • systemctl --user enable --now nxy-bot.service