Skip to content
Snippets Groups Projects
Commit 738f1ccd authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

module template: need to check if it's running for custom commands

parent 44d0cba6
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,11 @@ int Module::print_status()
int Module::custom_command(int argc, char *argv[])
{
/*
if (!is_running()) {
print_usage("not running");
return 1;
}
// additional custom commands can be handled like this:
if (!strcmp(argv[0], "do-something")) {
get_instance()->do_something();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment