18 lines
584 B
YAML
18 lines
584 B
YAML
apiVersion: v1
|
|
data:
|
|
qbittorrent-init.sh: |+
|
|
#!/bin/bash
|
|
# Wait for config file to exist
|
|
while [ ! -f /config/qBittorrent/qBittorrent.conf ]; do
|
|
sleep 1
|
|
done
|
|
|
|
# Add WebUI settings if they don't exist
|
|
grep -q "WebUI\\CSRFProtection" /config/qBittorrent/qBittorrent.conf || \
|
|
sed -i '/^\[Preferences\]/a WebUI\\CSRFProtection=false\nWebUI\\ClickjackingProtection=false\nWebUI\\HostHeaderValidation=false\nWebUI\\LocalHostAuth=false' /config/qBittorrent/qBittorrent.conf
|
|
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: qbittorrent-init-script
|
|
namespace: media
|