38 lines
1.1 KiB
Desktop File
38 lines
1.1 KiB
Desktop File
[Unit]
|
|||
|
|
Description=Now playing (Navidrome) for Lotus Chat "Listening to" cards
|
||
|
|
After=network-online.target matrix-synapse.service
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
User=lotus-now-playing
|
||
|
|
Group=lotus-now-playing
|
||
|
|
# MATRIX_TOKEN (Synapse admin API, user lookups only), shared with voice-limit-guard.
|
||
|
|
EnvironmentFile=/etc/matrix-deploy.env
|
||
|
|
# NAVIDROME_USER / NAVIDROME_PASSWORD for the read-only lotus-nowplaying account.
|
||
|
|
EnvironmentFile=/etc/lotus-now-playing/env
|
||
|
|
Environment=NAVIDROME_URL=http://10.10.10.28:4533
|
||
|
|
Environment=SERVER_NAME=matrix.lotusguild.org
|
||
|
|
Environment=BIND_HOST=0.0.0.0
|
||
|
|
Environment=BIND_PORT=8072
|
||
|
|
Environment=STATE_DIR=/var/lib/lotus-now-playing
|
||
|
|
Environment=USERS_FILE=/etc/lotus-now-playing/users.json
|
||
|
|
StateDirectory=lotus-now-playing
|
||
|
|
StateDirectoryMode=0750
|
||
|
|
ExecStart=/usr/bin/python3 /opt/lotus-now-playing/lotus_now_playing.py
|
||
|
|
Restart=always
|
||
|
|
RestartSec=10
|
||
|
|
StandardOutput=journal
|
||
|
|
StandardError=journal
|
||
|
|
SyslogIdentifier=lotus-now-playing
|
||
|
|
|
||
|
|
MemoryMax=96M
|
||
|
|
CPUQuota=20%
|
||
|
|
|
||
|
|
NoNewPrivileges=yes
|
||
|
|
ProtectSystem=strict
|
||
|
|
ProtectHome=yes
|
||
|
|
PrivateTmp=yes
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|