diff --git a/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs b/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs
index 75d5edbc574d7df4a04917346157ff5d395e9c29..63c6fd1c222de1033f001045989bcf499d4f1c79 100644
--- a/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs
+++ b/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs
@@ -251,7 +251,7 @@ catch
         {
             var fileName = Guid.NewGuid().ToString("N") + ".sh";
             var scriptPath = Path.Combine(AppContext.BaseDirectory, fileName);
-            var stopScript = @$"function list_child_processes(){{
+            var stopScript = @$"function list_child_processes () {{
     local ppid=$1;
     local current_children=$(pgrep -P $ppid);
     local local_child;
@@ -282,7 +282,7 @@ do
 done;
 rm {scriptPath};
 ";
-            File.WriteAllText(scriptPath, stopScript);
+            File.WriteAllText(scriptPath, stopScript.ReplaceLineEndings());
 
             var stopScriptInfo = new ProcessStartInfo("/bin/bash", scriptPath)
             {