Рефакторизация структуры кода для улучшения читаемости и удобства сопровождения.

This commit is contained in:
2026-04-30 07:41:41 +03:00
parent eec534760e
commit 89b17ea2b2
1406 changed files with 38483 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
if "${DFWEBOS_ROOT}/scripts/app" ls-installed | grep --quiet 'prowlarr'
then
CONFIG_FILE="${APP_DATA_DIR}/data/config/config.xml"
# Подождите, пока файл config.xml появится.
# Подождите, пока свойство ключа API (<ApiKey>) появится в файле конфигурации.
for attempt in $(seq 1 20); do
if [[ -f "${CONFIG_FILE}" ]] && cat "${CONFIG_FILE}" | grep --quiet '<ApiKey>'; then
echo "config.xml file exists and <ApiKey> xml key exists..."
# Перезапустите Prowlarr, чтобы автоматически настроить его как приложение.
"${DFWEBOS_ROOT}/scripts/app" restart prowlarr
exit
fi
sleep 1
done
>&2 echo "Error: Failed to locate <ApiKey> inside: ${CONFIG_FILE}"
exit 1
fi