Updated README and systemd unit
This commit is contained in:
24
README.md
24
README.md
@@ -1,16 +1,24 @@
|
||||
# Installation
|
||||
* Open shell as user nxy will run
|
||||
* Install virtualenvwrapper and source it
|
||||
* 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
|
||||
* Clone repo and change current dir
|
||||
- ```git clone https://gitfap.de/mrhanky/nxy.git```
|
||||
- ```cd nxy```
|
||||
* Create virtualenv and install dependencies
|
||||
- ```mkvirtualenv -a $PWD/nxy -r $PWD/nxy/requirements.txt nxy```
|
||||
- ```mkvirtualenv -a $PWD -r $PWD/requirements.txt nxy```
|
||||
* Copy ```.env-example``` and insert values in ```.env``` (replace everything wrapped in < and >)
|
||||
- ```cp .env-example .env```
|
||||
- ```vim .env```
|
||||
* Leave (auto) activated virtualenv and
|
||||
- ```deactivate```
|
||||
* Copy systemd unit (would recommend the ```/usr/local``` prefix)
|
||||
* Copy ```config.json``` and modify it (setup ZNC etc.)
|
||||
- ```cp config.json-example config.json```
|
||||
- ```vim config.json```
|
||||
* 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 $PWD/nxy/nxy-bot.service /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```
|
||||
|
||||
Reference in New Issue
Block a user