overwrite it as we need to add the apk command

This commit is contained in:
2025-02-24 15:09:11 +00:00
parent d789d505e3
commit d882dbee24
+10 -2
View File
@@ -1,8 +1,10 @@
apiVersion: v1 apiVersion: v1
data: data:
prowlarr_add_bulk_indexer.sh: | prowlarr_add_bulk_indexer.sh: |
#!/bin/bash #!/bin/sh
# install package with apk
apk add curl jq
# Base URL and API key # Base URL and API key
BASE_URL="https://prowlarr.tryton.geeraert.eu" BASE_URL="https://prowlarr.tryton.geeraert.eu"
API_KEY="0cb77d794ab74f158daaae044ab850ee" API_KEY="0cb77d794ab74f158daaae044ab850ee"
@@ -34,5 +36,11 @@ data:
done done
kind: ConfigMap kind: ConfigMap
metadata: metadata:
creationTimestamp: null annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"prowlarr_add_bulk_indexer.sh":"#!/bin/bash\n\n# Base URL and API key\nBASE_URL=\"https://prowlarr.tryton.geeraert.eu\"\nAPI_KEY=\"0cb77d794ab74f158daaae044ab850ee\"\n\nAPP_PROFILE_ID=1 # Set this to a valid App Profile Id\n\n# Get the list of all available indexers\navailable_indexers=$(curl -s -X GET \"$BASE_URL/api/v1/indexer/schema\" \\\n -H \"accept: application/json\" \\\n -H \"X-Api-Key: $API_KEY\")\n\n# Loop through each indexer and add it to Prowlarr\necho \"$available_indexers\" | jq -c '.[]' | while read -r indexer; do\n indexer_name=$(echo \"$indexer\" | jq -r '.name')\n indexer_settings=$(echo \"$indexer\" | jq -c '.')\n\n # Add the AppProfileId to the indexer settings\n indexer_settings=$(echo \"$indexer_settings\" | jq --argjson appProfileId \"$APP_PROFILE_ID\" '. + {AppProfileId: $appProfileId}')\n\n echo \"Adding indexer: $indexer_name\"\n\n curl -s -X POST \"$BASE_URL/api/v1/indexer\" \\\n -H \"accept: application/json\" \\\n -H \"X-Api-Key: $API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d \"$indexer_settings\"\n\n echo \"Indexer $indexer_name added.\"\ndone\n"},"kind":"ConfigMap","metadata":{"annotations":{},"creationTimestamp":null,"name":"prowlarr-add-bulk-indexer","namespace":"servarr"}}
creationTimestamp: "2025-02-24T14:53:38Z"
name: prowlarr-add-bulk-indexer name: prowlarr-add-bulk-indexer
namespace: servarr
resourceVersion: "101531049"
uid: daa8c869-779c-49f2-a2ca-bad2d6d77035