0.16.1-1 Installer Fix
This commit is contained in:
+12
-1
@@ -446,7 +446,9 @@ install_makemkv() {
|
|||||||
sync_makemkv_beta_key() {
|
sync_makemkv_beta_key() {
|
||||||
header "MakeMKV Betakey synchronisieren"
|
header "MakeMKV Betakey synchronisieren"
|
||||||
|
|
||||||
local backend_settings_url="http://127.0.0.1:${BACKEND_PORT}/settings"
|
local backend_base_url="http://127.0.0.1:${BACKEND_PORT}/api"
|
||||||
|
local backend_health_url="${backend_base_url}/health"
|
||||||
|
local backend_settings_url="${backend_base_url}/settings"
|
||||||
local beta_api_url="https://cable.ayra.ch/makemkv/api.php?json"
|
local beta_api_url="https://cable.ayra.ch/makemkv/api.php?json"
|
||||||
local settings_response=""
|
local settings_response=""
|
||||||
local current_key=""
|
local current_key=""
|
||||||
@@ -454,6 +456,7 @@ sync_makemkv_beta_key() {
|
|||||||
local beta_key=""
|
local beta_key=""
|
||||||
local save_response=""
|
local save_response=""
|
||||||
local makemkv_settings_file="${SERVICE_HOME}/.MakeMKV/settings.conf"
|
local makemkv_settings_file="${SERVICE_HOME}/.MakeMKV/settings.conf"
|
||||||
|
local wait_attempt=0
|
||||||
|
|
||||||
update_makemkv_settings_file_key() {
|
update_makemkv_settings_file_key() {
|
||||||
local settings_file="$1"
|
local settings_file="$1"
|
||||||
@@ -473,6 +476,14 @@ sync_makemkv_beta_key() {
|
|||||||
chmod 600 "$settings_file" 2>/dev/null || true
|
chmod 600 "$settings_file" 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (( wait_attempt < 10 )); do
|
||||||
|
if curl -fsS "$backend_health_url" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
wait_attempt=$((wait_attempt + 1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
if ! settings_response=$(curl -fsS "$backend_settings_url" 2>/dev/null); then
|
if ! settings_response=$(curl -fsS "$backend_settings_url" 2>/dev/null); then
|
||||||
warn "Backend-Settings konnten nicht geladen werden."
|
warn "Backend-Settings konnten nicht geladen werden."
|
||||||
warn "Betakey-Synchronisierung übersprungen: $backend_settings_url"
|
warn "Betakey-Synchronisierung übersprungen: $backend_settings_url"
|
||||||
|
|||||||
Reference in New Issue
Block a user