Skip to content

Run user script on detection #21

@ArkadiuszRaj

Description

@ArkadiuszRaj

When event is detected it is convinient to run some script, like automatic uploader.
Here is example I use in my local build of freeture.

// ***************************** starting user script *****************************
if(boost::filesystem::exists(mdtp.DET_EVENT_USER_ACTION) ){
string commandString = mdtp.DET_EVENT_USER_ACTION + " " + mEventPath;
BOOST_LOG_SEV(logger,notification) << "Executing user command : " << commandString;
std::thread ut(this,commandString{ system(commandString.c_str()); });
ut.detach();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions