Create command alias with args

What product/components do you use and which version/fix level are you on?

Cumuloticity 10.13. I’m using the python device management agent from here: GitHub - SoftwareAG/cumulocity-devicemanagement-agent: Cumulocity Reference Agent written in Python to demonstrate most of the Device Management Capabilities of Cumulocity IoT

Is your question related to the free trial, or to a production (customer) instance?

Production

What are you trying to achieve? Please describe it in detail.

Send a command via shell with an argument, such as “mkdir” [path/dir name]

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

we’re on 10.13; not ready to update further.

I’ve figured out how to send custom commands on my linux text box and have them work. if I edit Home/.local/lib/python3.10/site-packages/c8ydm/agentmodules/command_handler.py, I can add another CommandAlias ([command name],[command syntax], such as CommandAlias(‘make dave/testdir’, ‘mkdir /home/dave/testdir’) and that creates the testdir in my home. The next step is to make a command alias with args but the syntax in the command_handler to that doesn’t make a lot of sense to me so I wonder if someone has a guide on how to do that. As an example, I’d love to send mkdir [path\dirname] as a command alias of mkdir with the arg of \home\dave\testdir. (for example

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.