Signed-off-by: Felix Fietkau <nbd@nbd.name>
setsid();
uloop_init();
procd_signal();
- trigger_init();
if (getpid() != 1)
procd_connect_ubus();
else
void procd_bcast_event(char *event, struct blob_attr *msg);
struct trigger;
-void trigger_init(void);
void trigger_event(const char *type, struct blob_attr *data);
void trigger_add(struct blob_attr *rule, void *id);
void trigger_del(void *id);
};
static LIST_HEAD(triggers);
-static struct runqueue q;
+static RUNQUEUE(q, 1);
static const char* rule_handle_var(struct json_script_ctx *ctx, const char *name, struct blob_attr *vars)
{
}
}
-void trigger_init(void)
-{
- runqueue_init(&q);
- q.max_running_tasks = 1;
-}
-
static bool trigger_match(const char *event, const char *match)
{
char *wildcard = strstr(match, ".*");