2019-08-06 17:08:11 -05:00
|
|
|
# ccchatbot
|
2019-08-06 13:31:58 -05:00
|
|
|
|
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
[![pipeline status](https://dev.sum7.eu/ccchb/ccchatbot/badges/master/pipeline.svg)](https://dev.sum7.eu/ccchb/ccchatbot/pipelines)
|
|
|
|
[![coverage report](https://dev.sum7.eu/ccchb/ccchatbot/badges/master/coverage.svg)](https://dev.sum7.eu/ccchb/ccchatbot/pipelines)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/dev.sum7.eu/ccchb/ccchatbot)](https://goreportcard.com/report/dev.sum7.eu/ccchb/ccchatbot)
|
|
|
|
[![GoDoc](https://godoc.org/dev.sum7.eu/ccchb/ccchatbot?status.svg)](https://godoc.org/dev.sum7.eu/ccchb/ccchatbot)
|
2019-08-06 13:31:58 -05:00
|
|
|
|
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
## Get ccchatbot
|
2019-08-06 13:31:58 -05:00
|
|
|
|
|
|
|
#### Download
|
|
|
|
|
|
|
|
Latest Build binary from ci here:
|
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
[Download All](https://dev.sum7.eu/ccchb/ccchatbot/-/jobs/artifacts/master/download/?job=build-my-project) (with config example)
|
2019-08-06 13:31:58 -05:00
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
[Download Binary](https://dev.sum7.eu/ccchb/ccchatbot/-/jobs/artifacts/master/raw/bin/ccchatbot?inline=false&job=build-my-project)
|
2019-08-06 13:31:58 -05:00
|
|
|
|
|
|
|
#### Build
|
|
|
|
|
|
|
|
```bash
|
2019-08-06 17:08:11 -05:00
|
|
|
go get -u dev.sum7.eu/ccchb/ccchatbot
|
2019-08-06 13:31:58 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
## Configure
|
|
|
|
|
|
|
|
see `config_example.toml`
|
|
|
|
|
|
|
|
## Start / Boot
|
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
_/lib/systemd/system/ccchatbot.service_ :
|
2019-08-06 13:31:58 -05:00
|
|
|
```
|
|
|
|
[Unit]
|
2019-08-06 17:08:11 -05:00
|
|
|
Description=ccchatbot
|
2019-08-06 13:31:58 -05:00
|
|
|
After=network.target
|
|
|
|
# After=ejabberd.service
|
|
|
|
# After=prosody.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
# User=notRoot
|
2019-08-06 17:08:11 -05:00
|
|
|
ExecStart=/opt/go/bin/ccchatbot --config /etc/ccchatbot.conf
|
2019-08-06 13:31:58 -05:00
|
|
|
Restart=always
|
|
|
|
RestartSec=5sec
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
```
|
|
|
|
|
2019-08-06 17:08:11 -05:00
|
|
|
Start: `systemctl start ccchatbot`
|
|
|
|
Autostart: `systemctl enable ccchatbot`
|