I am absolutely new to ASP.NET Core.
I want to send a GET-Request to my Linux server which is hosting my ASP.NET Core API to execute some bash commands and return the given output in my GET-Response.
I found a similar question: ASP.NET Core execute Linux shell command but I am not sure if the answer is really the solution for my problem neither how to use this package.
Is there a solution for this like:
[HttpGet]
public async Task<ActionResult<IEnumerable<TodoItem>>> GetTodoItems()
{
bashOutput = BASHCOMMAND(whoami);
return await bashOutput;
}
Or is there may a better way to execute commands on my linux server and return the value via API? It doesn't have to be ASP.NET Core.