ConfD User Community

'maapi: command not found' in custom command

I’ve made a simple script for a custom command, and would like to call maapi (would like to override the save command so it is forced for run in a specific directory only). The script is just:

#!/bin/bash
echo "In save..."
maapi --clicmd save "/files/output.xml"

The CLI spec for this command is:

<cmd name="save">
    <help>save</help>
    <info>save</info>
    <callback>
        <exec>
            <osCommand>./save.sh</osCommand>
        </exec>
    </callback>
</cmd>

Is there some configuration needed to enable the maapi command? I didn’t see anything in the UG man page, just an example of how to use it.

Thanks

‘maapi’ binary is not available in $PATH in the environment of save.sh.

Change the command to $CONFD_DIR/bin/maapi (assuming you have CONFD_DIR path set via confrc script.

2 Likes

Thanks, that was it alright. I’ll update the $PATH so. :slight_smile: