From 2cb8d6c24e201c1664a263f3e34fa2df3c32bc98 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 14 May 2026 00:12:18 +0200 Subject: [PATCH] test --- modules/server/containers/apps/jellyfin.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/server/containers/apps/jellyfin.nix b/modules/server/containers/apps/jellyfin.nix index 8407f03..22bff47 100644 --- a/modules/server/containers/apps/jellyfin.nix +++ b/modules/server/containers/apps/jellyfin.nix @@ -68,19 +68,19 @@ in { envFile = config.sops.secrets."CUSTOM".path; script = pkgs.writeShellScript "setup" '' JELLYFIN_URL="http://jellyfin-server:8096" - until ${pkgs.curl} -sf "\${JELLYFIN_URL}/health" > /dev/null 2>&1; do + until ${pkgs.curl} -sf "$JELLYFIN_URL/health" > /dev/null 2>&1; do sleep 5 done echo "Jellyfin is up. Sleeping for 20 seconds..." sleep 20 - WIZARD_COMPLETE=$(${pkgs.curl}/bin/curl -sSf "\${JELLYFIN_URL}/System/Info/Public" 2>/dev/null | \ + WIZARD_COMPLETE=$(${pkgs.curl}/bin/curl -sSf "$JELLYFIN_URL/System/Info/Public" 2>/dev/null | \ ${pkgs.jq}/bin/jq -r '.StartupWizardCompleted // false') if [ "$WIZARD_COMPLETE" = "true" ]; then echo "Jellyfin wizard already completed. Exiting cleanly." exit 0 fi - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''\${JELLYFIN_URL}/Startup/Configuration" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/Configuration" \ -H "Content-Type: application/json" \ -d '{"ServerName":"jellyfin","UICulture":"en-US","MetadataCountryCode":"US","PreferredMetadataLanguage":"en"}'; then echo "ERROR: Failed to set startup configuration." @@ -92,9 +92,9 @@ in { --arg pass "''\${DEFAULT_ADMIN_PASSWORD}" \ '{"Name": $name, "Password": $pass}') - echo "Payload to be sent to /Startup/User: ''${SETUP_USER_PAYLOAD}" + echo "Payload to be sent to /Startup/User: ''$SETUP_USER_PAYLOAD" - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''${JELLYFIN_URL}/Startup/User" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/User" \ -H 'accept: */*' \ -H "Content-Type: application/json" \ -d "''${SETUP_USER_PAYLOAD}"; then @@ -103,7 +103,7 @@ in { fi # Enable remote access, disable UPnP auto-mapping - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''\${JELLYFIN_URL}/Startup/RemoteAccess" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/RemoteAccess" \ -H "Content-Type: application/json" \ -d '{"EnableRemoteAccess":true,"EnableAutomaticPortMapping":false}'; then echo "ERROR: Failed to configure remote access." @@ -111,7 +111,7 @@ in { fi # Complete the wizard - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''\${JELLYFIN_URL}/Startup/Complete"; then + if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/Complete"; then echo "ERROR: Failed to complete wizard." exit 1 fi