Installation en tant que service
This commit is contained in:
16
README.md
16
README.md
@@ -8,7 +8,7 @@ Voir la [documentation technique - Bot et Integrations Tchap](https://aide.tchap
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
```bash
|
||||
git clone https://gitlab-forge.din.developpement-durable.gouv.fr/drieat-if/dsin/usrt/tchap-beta.git
|
||||
cd tchap-beta
|
||||
python -m venv .venv
|
||||
@@ -24,7 +24,19 @@ editor .env
|
||||
python -c 'import secrets; print("salt=", secrets.token_bytes(16), sep="")' >> .env
|
||||
|
||||
# Lancer
|
||||
python tchapbeta.py
|
||||
python tchap-beta.py
|
||||
```
|
||||
|
||||
Pour que les messages apparaissent authentifiés, il faut se connecter sur [Tchap](https://www.tchap.gouv.fr/) avec le compte du bot et taper dans un salon `/verify <device-id> <device-fingerprint>` avec les informations indiquées au démarrage du bot (sans les espaces).
|
||||
|
||||
## Installer en tant que service
|
||||
|
||||
En plus des commandes précédentes :
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
mv tchap-beta /opt/tchap-beta
|
||||
sudo cp /opt/tchap-beta/tchap-beta.service /lib/systemd/system/
|
||||
sudo adduser --system chatbeta
|
||||
sudo systemctl enable --now tchap-beta.service
|
||||
````
|
||||
|
||||
Reference in New Issue
Block a user