This commit is contained in:
Tobias 2025-11-21 11:31:18 +01:00 committed by GitHub
parent 8164004e7a
commit 3cb78cf13a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,7 +121,7 @@ After=network.target
[Service]
User=root
WorkingDirectory=/opt/qbittorrent-exporter/src
EnvironmentFile="$CONFIG_PATH"
EnvironmentFile=$CONFIG_PATH
ExecStart=/opt/qbittorrent-exporter/src/qbittorrent-exporter
Restart=always
@ -142,6 +142,12 @@ pidfile="/opt/qbittorrent-exporter/src/pidfile"
depend() {
need net
}
start_pre() {
if [ -f "$CONFIG_PATH" ]; then
export \$(grep -v '^#' $CONFIG_PATH | xargs)
fi
}
EOF
chmod +x "$SERVICE_PATH"
rc-update add qbittorrent-exporter default &>/dev/null