refactor
This commit is contained in:
parent
8164004e7a
commit
3cb78cf13a
@ -121,7 +121,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/qbittorrent-exporter/src
|
WorkingDirectory=/opt/qbittorrent-exporter/src
|
||||||
EnvironmentFile="$CONFIG_PATH"
|
EnvironmentFile=$CONFIG_PATH
|
||||||
ExecStart=/opt/qbittorrent-exporter/src/qbittorrent-exporter
|
ExecStart=/opt/qbittorrent-exporter/src/qbittorrent-exporter
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
@ -142,6 +142,12 @@ pidfile="/opt/qbittorrent-exporter/src/pidfile"
|
|||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
if [ -f "$CONFIG_PATH" ]; then
|
||||||
|
export \$(grep -v '^#' $CONFIG_PATH | xargs)
|
||||||
|
fi
|
||||||
|
}
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$SERVICE_PATH"
|
chmod +x "$SERVICE_PATH"
|
||||||
rc-update add qbittorrent-exporter default &>/dev/null
|
rc-update add qbittorrent-exporter default &>/dev/null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user