generated from Nemesis/Exemple
exemple de service pour systemd
This commit is contained in:
parent
58e101fce2
commit
f990ccb2f8
1 changed files with 21 additions and 0 deletions
21
systemd.md
Normal file
21
systemd.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Bot Matrix Asmodee
|
||||||
|
After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=nemesis
|
||||||
|
Group=users
|
||||||
|
Environment=PYTHONUNBUFFERED=1
|
||||||
|
Environment=HOME=/home/nemesis
|
||||||
|
WorkingDirectory=/home/nemesis/work/matrix_python
|
||||||
|
ExecStart=/usr/bin/python3 -u /home/nemesis/work/matrix_python/asmodee.py
|
||||||
|
ExecStop=/bin/kill -9 $MAINPID
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
|
SyslogIdentifier=asmodee
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue