nxy irc bot
Go to file
2017-07-04 16:41:54 +02:00
migrate Added migrate script, ready to roll i guess 2017-06-30 17:47:24 +02:00
nxy Fixed joining of quote words 2017-07-04 16:41:54 +02:00
.env-example Update .env-example 2017-07-04 14:03:55 +00:00
.gitignore Updated README and systemd unit 2017-07-04 15:47:57 +02:00
config.json-example Updated README and systemd unit 2017-07-04 15:47:57 +02:00
nxy-bot.service Updated README and systemd unit 2017-07-04 15:47:57 +02:00
README.md Added instructions for migrate 2017-07-04 16:13:43 +02:00
repl.py Import order... 2017-06-30 14:09:46 +02:00
requirements.txt Some refactoring, pgsql follows...soon™ 2017-06-29 22:56:32 +02:00
schema.sql Bla, added install instructions 2017-07-04 15:22:20 +02:00
ssl.error Renamed db storage plugin, added comments, updated bot startup script with comments, commented the repl helper and added the ssl error from n0xy for later fix, updated sql schema 2017-06-30 13:33:21 +02:00

Installation

  • Open shell as user nxy will run. These instructions will use nxy as user and /home/nxy as its home directory.
  • Install virtualenvwrapper (ideally system wide).
  • Open shell as user nxy, source virtualenvwrappers script
    • sudo -u nxy -i
    • source $(which virtualenvwrapper.sh)
  • Clone repo and change current dir
    • git clone https://gitfap.de/mrhanky/nxy.git
    • cd nxy
  • Create virtualenv and install dependencies
    • mkvirtualenv -a $PWD -r $PWD/requirements.txt nxy
  • Create needed tables in the database:
    • psql -U <your db user> < schema.sql
  • Copy .env-example and insert values in .env (replace everything wrapped in < and >)
    • cp .env-example .env
    • vim .env
  • Copy config.json and modify it (setup ZNC etc.)
    • cp config.json-example config.json
    • vim config.json
  • If database is empty, run the migrate script to populate the database with old nxy data:
    • python bot/migrate.py
  • Leave (auto) activated virtualenv and exit the bot's shell
    • deactivate && exit
  • Copy systemd unit and enable it (would recommend the /usr/local prefix). Don't forget to modify the systemd unit if your user and home directory are different!
    • sudo mkdir -p /usr/local/lib/systemd/system
    • sudo cp /home/nxy/nxy/nxy-bot.service /usr/local/lib/systemd/system
    • sudo systemctl daemon-reload
    • sudo systemctl enable --now nxy-bot.service