Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run user script on detection #21

Open
ArkadiuszRaj opened this issue Jul 1, 2016 · 3 comments
Open

Run user script on detection #21

ArkadiuszRaj opened this issue Jul 1, 2016 · 3 comments

Comments

@ArkadiuszRaj
Copy link
Contributor

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();
}

@cmarmo
Copy link
Contributor

cmarmo commented Jul 1, 2016

Hi,
this was a Christmas wish... :)
Thanks for your code, I will try to test it ASAP... but please, be patient :)

@ArkadiuszRaj
Copy link
Contributor Author

See #24

@ArkadiuszRaj
Copy link
Contributor Author

Hi @MatthieuGarnung can you push for merging this PR #24 ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants