[docs] add README for triggers and actions

This commit is contained in:
2023-10-31 00:45:44 +01:00
parent 18e3a93a38
commit bccdcf2ca3
2 changed files with 42 additions and 0 deletions

View File

@@ -1 +1,21 @@
# Triggers
Triggers wait for certain events and execute the actions defined for them.
There are different Triggers for different use cases.
For example ```UsbDisconnect``` is triggered when a certain Usb Drive is unplugged.
If you want your actions to be triggered when an ethernet cable is pulled use ```EthernetDisconnect``` instead.
Triggers have the following syntax:
``` json
{
"type": "SomeTrigger",
"name": "MyFirstTrigger",
"options": { //each trigger defines its own options
"firstOption": 23,
"secondOption": "foo"
},
"actions": [] //list actions that should be executed here
}
```
To get a list of all triggers and their options from the commandline run ```gokill -d```