Securely execute scripts on remote Servers using simple HTTP GET requests.
I made a setup script to install GoRemoteScriptExecutor on your Server. It automatically detects your cpu architecture and downloads the correct executable and manages everything for you.
wget https://raw.githubusercontent.com/Binozo/GoRemoteScriptExecutor/master/install.sh -O install.sh && chmod +x install.sh && sudo ./install.shYou can also install GoRemoteScriptExecutor manually.
- Download the latest executable from the Releases Page and rename it to
goremotescriptexecutor. - Place the executable in the
/opt/goremotescriptexecutor/directory. - Make it executable.
chmod +x /opt/goremotescriptexecutor/goremotescriptexecutor - Add the
goremotescriptexecutordirectory to your user group.
cd /opt/ && chown -R $USER:$USER goremotescriptexecutor - Create a password:
/opt/goremotescriptexecutor/goremotescriptexecutor --set-password <password> - If everything is fine, create a systemd service for the executable.
Note: For help look at the installation script.
Take a look at GitHubActionRemoteScriptExecutor.
Note: you will need to pass the Authorization header with your password.
Authorization: <password>
Returns some basic info like application name and version. Example:
{
"name" : "GoRemoteScriptExecutor",
"version" : "0.1"
}Returns a list of all scripts found in the scripts directory. Example:
{
"scripts" : [
"script1.sh",
"script2.sh"
],
"status" : "ok"
}Executes the script with the given name. Possible GET parameters:
blocking(optional) - If set totruethe script will be executed in blocking mode. Default isfalse.responseOutput(optional) - If set totruethe script output will be sent back to you. Default isfalse. Example:
{
"status" : "ok"
}Checks if an update is available and updates automatically. Example:
{
"status" : "ok",
"message" : "Update available. Update will be downloaded and installed automatically."
}