Skip to content

Commit 56aef06

Browse files
sijiszoni
authored andcommitted
docs: Add example init daemon configs (errbotio#863)
1 parent 3da46bb commit 56aef06

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

docs/code_examples/supervisord.conf

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[program:errbot]
2+
command = /path/to/errbot/virtualenv/bin/errbot --config /path/to/errbot/config.py
3+
user = errbot
4+
stdout_logfile = /var/log/supervisor/errbot.log
5+
stderr_logfile = NONE
6+
redirect_stderr = true
7+
directory = /path/to/errbot/
8+
startsecs = 3
9+
stopsignal = INT
10+
environment = LC_ALL="en_US.UTF-8"

docs/code_examples/systemd.service

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=Start Errbot chatbot
3+
After=network.service
4+
5+
[Service]
6+
Environment="LC_ALL=en_US.UTF-8"
7+
ExecStart=/path/to/errbot/virtualenv/bin/errbot --config /path/to/errbot/config.py
8+
WorkingDirectory=/path/to/errbot/
9+
User=errbot
10+
Restart=always
11+
KillSignal=SIGINT

docs/user_guide/setup.rst

+14
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,20 @@ is outside the scope of this document however.
148148

149149
If you're running errbot in the foreground then pressing Ctrl+C is equivalent to sending `SIGINT`.
150150

151+
Daemon Configurations
152+
^^^^^^^^^^^^^^^^^^^^^
153+
154+
These are a few example configurations using common init daemons:
155+
156+
**supervisord** (`/etc/supervisor/conf.d/errbot.conf`)
157+
158+
.. literalinclude:: ../code_examples/supervisord.conf
159+
:language: sh
160+
161+
**systemd** (`/etc/systemd/system/errbot.service`)
162+
163+
.. literalinclude:: ../code_examples/systemd.service
164+
:language: sh
151165

152166
Upgrading
153167
---------

0 commit comments

Comments
 (0)