System commands

system.command

{
  "list-source": {
    "sequence": 1,
    "command": "system.command",
    "params": {
      "command": "ls -las /home"
    }
  }
}

Functionality:

  • Run command on server

system.upload_template

{
  "upload-environment-config": {
    "sequence": 1,
    "command": "system.upload_template",
    "params": {
      "source": "some/file/in/the/template/path.ini",
      "target": "/path/where/to/copy/on/the/server.ini",
      "yourvar_1": "whatever",
      "yourvar_2": "you-want"
    }
  }
}

Functionality:

  • Uploads template from .template folder/file to server.
  • Renders the template with params.. you can use {{ param_name }} in the template. In this example the path.ini could contain the param {{ yourvar_1 }}.
  • Unlimited own params.. source and target are required

system.ensure_path

{
  "your-own-description": {
    "sequence": 1,
    "command": "system.ensure_path",
    "params": {
      "path": "/the/full/path/you/need"
    }
  }
}

Functionality:

  • Checks if folders exists, if not it will try to create the path

system.download_from_remote

{
  "your-own-description": {
    "sequence": 1,
    "command": "system.download_from_remote",
    "params": {
      "remote_path": "/some/remote/path/*.jpg",
      "local_path": "./templates/tmp"
    }
  }
}

Functionality:

  • Will download file(s)
  • Can use wildcards for files.
  • Can download one or more files/folders

system.cleanup_old_files

{
  "delete-old-files": {
    "sequence": 1,
    "command": "system.cleanup_old_files",
    "params": {
      "minutes": "86400",
      "path": "/some/path"
    }
  }
}

Params: - minutes : Remove files older then x minutes (optional, default 86400) - path : path to folder.(required)

Functionality:

  • Deletes old files and (sub)folders