Commands not working in Shell

Hello all,

I am using the following code, in a web app, to restart certain apps of my product. The commands, when entered in Terminal, execute perfectly. Same as when using putty. But they do not execute from the app. Can anyone suggest a solution?

Dim sh As New Shell
sh.Execute("sudo systemctl stop axcys-engine.service")

Thank You,
Tim

https://documentation.xojo.com/api/os/shell.html
"The Shell is not equivalent to the Terminal or Command app for your OS. "

Plus, sudo is going to require authentication. If you’re in an elevated permission session with your OS terminal it may not require a password, but use of sudo almost always gets you a response of “Password:”. Try an asynchronous shell to see if you can capture and respond to the authentication.

Will do Tim,

Part of my challenge is that remote debug is not working for this web app - would be a whole lot easier if it did!
Tim

Hi Tim,

Having trouble with remote debug, but even with a compiled app, there is nothing that comes back from the shell. I tried the shell interactive desktop, using remote debug, and that in fact work. I wonder if it has to do with the fact that this is a web app?
Tim

I have no competence here, but what if you launch the Xojo built app using sudo?

your web app start normal and run awhile?
did you log the error in this app event?
maybe it bring a issue to light.

[code]Function UnhandledException(Error As RuntimeException) Handles UnhandledException as Boolean

End Function
[/code]