Dateien nach "systemd" hochladen
This commit is contained in:
1 parent
1c5b8c5685
commit
20d0d385c6
1 file changed
+31
@@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=Shelly RGBW2 Animator Service
|
||||
After=network-online.target mosquitto.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
WorkingDirectory=/opt/shelly-animator
|
||||
ExecStart=/opt/shelly-animator/venv/bin/python app/main.py
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
# Environment (or use EnvironmentFile=)
|
||||
Environment=SHELLY_HOST=192.168.178.151
|
||||
Environment=SHELLY_USER=shelly@till.immers.ch
|
||||
Environment=SHELLY_PASS=sh3llyTi33*
|
||||
Environment=MQTT_HOST=localhost
|
||||
Environment=MQTT_PORT=1884
|
||||
Environment=MQTT_PREFIX=shelly-animator
|
||||
Environment=LOG_LEVEL=INFO
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/opt/shelly-animator
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user