add systemd service
This commit is contained in:
parent
64323c366f
commit
035751acda
2 changed files with 23 additions and 0 deletions
|
|
@ -9,6 +9,12 @@
|
||||||
- als **root** ausführen
|
- als **root** ausführen
|
||||||
- gunicorn -b 0.0.0.0 -w 1 -k gthread main:app
|
- gunicorn -b 0.0.0.0 -w 1 -k gthread main:app
|
||||||
|
|
||||||
|
# Beim Booten starten
|
||||||
|
|
||||||
|
- Kopiere die systemd/matrix.service nach /etc/systemd/service/
|
||||||
|
- systemctl daemon-reload
|
||||||
|
- systemctl enable --now matrix
|
||||||
|
|
||||||
# Dateien
|
# Dateien
|
||||||
|
|
||||||
- main.py (das Hauptprogramm und der Flask-Webserver)
|
- main.py (das Hauptprogramm und der Flask-Webserver)
|
||||||
|
|
@ -43,6 +49,8 @@ curl http://localhost:8000/start/bitcoin
|
||||||
curl http://localhost:8000/start/clock
|
curl http://localhost:8000/start/clock
|
||||||
curl http://localhost:8000/start/colorclock
|
curl http://localhost:8000/start/colorclock
|
||||||
curl http://localhost:8000/start/helloworld
|
curl http://localhost:8000/start/helloworld
|
||||||
|
curl http://localhost:8000/start/scroll
|
||||||
|
curl http://localhost:8000/start/piamedia
|
||||||
curl http://localhost:8000/stop
|
curl http://localhost:8000/stop
|
||||||
curl http://localhost:8000/reset
|
curl http://localhost:8000/reset
|
||||||
|
|
||||||
|
|
|
||||||
15
matrix.service
Normal file
15
matrix.service
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Matrix Flask Application
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/matrix
|
||||||
|
ExecStart=/usr/bin/gunicorn -b 0.0.0.0 -w 1 -k gthread main:app
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
Add table
Add a link
Reference in a new issue