first commit
This commit is contained in:
29
deploy/pytorrent.service
Normal file
29
deploy/pytorrent.service
Normal file
@@ -0,0 +1,29 @@
|
||||
# useradd --system --home /opt/pyTorrent --shell /usr/sbin/nologin pytorrent
|
||||
# chown -R pytorrent:pytorrent /opt/pyTorrent
|
||||
|
||||
[Unit]
|
||||
Description=pyTorrent Web UI
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
#User=root
|
||||
#Group=root
|
||||
User=pytorrent
|
||||
Group=pytorrent
|
||||
WorkingDirectory=/opt/pyTorrent
|
||||
Environment="PYTHONUNBUFFERED=1"
|
||||
EnvironmentFile=/opt/pyTorrent/.env
|
||||
ExecStart=/opt/pyTorrent/venv/bin/python /opt/pyTorrent/app.py
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=20
|
||||
|
||||
# opcjonalnie
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user