Open
Conversation
svvimming
commented
Mar 15, 2023
| const path = req.query.path | ||
| const remoteProcess = executeRemoteProcess(command, path) | ||
| .then((result) => { | ||
| console.log(result) |
Contributor
Author
There was a problem hiding this comment.
@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?
svvimming
commented
Mar 15, 2023
| MC.app.get(REMOTE_EXEC_ENPOINT, async (req, res) => { | ||
| const command = req.query.command | ||
| const path = req.query.path | ||
| const remoteProcess = executeRemoteProcess(command, path) |
Contributor
Author
There was a problem hiding this comment.
@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
Collaborator
|
I keep forgetting about this PR, it's still on my docket to take care of! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ENVvariables in the open-panda backend packages. Likewise, the endpoint name is also stored as anENVvariable for the sake of obfuscation.Still to be added:
execcommandTicket link
https://www.notion.so/agencyundone/Endpoint-that-executes-an-external-file-when-hit-2da36661d8464929ac90993c0746dd2f?pvs=4