diff --git a/k8s/jackett/deployment.yaml b/k8s/jackett/deployment.yaml index 02100e5..b1bc0c7 100644 --- a/k8s/jackett/deployment.yaml +++ b/k8s/jackett/deployment.yaml @@ -30,9 +30,14 @@ spec: - /bin/bash - -c - | - if [ ! -f /config/ServerConfig.json ] && [ -f /host-config/ServerConfig.json ]; then - echo "Migrating Jackett config and indexers from host..." - cp -a /host-config/* /config/ + mkdir -p /config/Jackett + if [ ! -f /config/Jackett/ServerConfig.json ] || [ -f /config/ServerConfig.json ]; then + echo "Syncing Jackett config and indexers from host..." + [ -d /host-config/Indexers ] && cp -a /host-config/Indexers /config/Jackett/ + [ -d /host-config/DataProtection ] && cp -a /host-config/DataProtection /config/Jackett/ + [ -f /host-config/ServerConfig.json ] && cp -a /host-config/ServerConfig.json /config/Jackett/ + # Remove misplaced root files if present + rm -rf /config/Indexers /config/ServerConfig.json /config/DataProtection /config/log.txt* /config/updater.txt* fi chown -R 33:33 /config volumeMounts: