-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: exec remote script endpoint #64
base: develop
Are you sure you want to change the base?
Conversation
const path = req.query.path | ||
const remoteProcess = executeRemoteProcess(command, path) | ||
.then((result) => { | ||
console.log(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orvn I was wondering if you wanted to console log the non-error output of the script / send it back as part of the successful response?
MC.app.get(REMOTE_EXEC_ENPOINT, async (req, res) => { | ||
const command = req.query.command | ||
const path = req.query.path | ||
const remoteProcess = executeRemoteProcess(command, path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orvn this function should be able to pass arguments from the get request into the shell script process. What should the structure look like coming from the query params? something like:
{
foo: bar
}
gets passed to the script as:
--foo bar
I keep forgetting about this PR, it's still on my docket to take care of! |
Description
Endpoint added to execute a shell script which will live somewhere on the server and need to be accessible by the endpoint from an absolute path. The absolute path to the script as well as the script's filename will be stored as
ENV
variables in the open-panda backend packages. Likewise, the endpoint name is also stored as anENV
variable for the sake of obfuscation.Still to be added:
exec
commandTicket link
https://www.notion.so/agencyundone/Endpoint-that-executes-an-external-file-when-hit-2da36661d8464929ac90993c0746dd2f?pvs=4