Writes the default NGINX server configuration to a specified path. Handles file write errors, specifically permission issues, by prompting the user.
Module
setDefaultServerBlock
Handles permission errors by offering options to retry with elevated privileges, display manual configuration instructions, or cancel the operation.
Attempts to perform an operation with elevated privileges using platform-specific commands.
Escapes shell-specific characters in a string to safely include it in a shell command.
Displays manual instructions for configuring NGINX in case of permission errors or user preference.
Executes a shell command and returns a promise that resolves with the command output or rejects with an error.