summaryrefslogtreecommitdiff
path: root/rhdropbox.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-22 17:34:33 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-22 17:34:33 (GMT)
commit70329443abb6008ed004f3a90b79ba93ea492492 (patch)
treed2616d5893046cd96d48a90958167587f37ae1db /rhdropbox.c
parente17921ef33bc4eda43d07bafbf63596e6f87e6bd (diff)
script gets called now
added smaple newfile.sh
Diffstat (limited to 'rhdropbox.c')
-rw-r--r--rhdropbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rhdropbox.c b/rhdropbox.c
index 0226c2f..5c3ca2d 100644
--- a/rhdropbox.c
+++ b/rhdropbox.c
@@ -94,7 +94,10 @@ int process_watch(int inotify_fd, read_buffer_t* buffer, watch_list_t* watch_lst
log_printf(DEBUG, "ignoring inotify_rm_watch based events");
}
else {
-/* call script here */
+ char* const argv[] = { opt->script_, path, event->len > 0 ? event->name : "", NULL };
+ char* const evp[] = { NULL };
+ uanytun_exec(opt->script_, argv, evp);
+
char buf[100];
snprintf(buf, 100, "new file in '%s', name='%s'", path, event->len > 0 ? event->name : "");
client_t* client;