forked from jpmens/mqtt-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.conf.example
48 lines (43 loc) · 2.21 KB
/
launcher.conf.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
logfile = 'logfile'
topic_prefix = 'mqtt-launcher-1' # Required
mqtt_broker = 'localhost' # default: 'localhost'. If using TLS, this must be set to the domain name signed by your TLS certificate.
mqtt_port = 1883 # default: 1883
mqtt_username = None
mqtt_password = None
#mqtt_username = 'jane'
#mqtt_password = 'secret'
mqtt_tls = None # default: No TLS
#mqtt_qos = 1 # default: 2
#mqtt_keepalive = 60 # default: 60
#mqtt_clientid = 'mqtt-launcher-1' # optional, default: mqtt-launcher-<hash-from-topic_prefix>
# Status topic payloads
#status_topic = 'status' # optional, default: status
#status_payload_running = 'running' # optional, default: running
#status_payload_stopped = 'stopped' # optional, default: stopped
#status_payload_dead = 'dead' # optional, default: dead
# topic prefix will be added automatically
topiclist = {
# topic payload value program & arguments
"sys/file" : {
'create' : [ '/usr/bin/touch', '/tmp/file.one' ],
'false' : [ '/bin/rm', '-f', '/tmp/file.one' ],
'info' : [ '/bin/ls', '-l', '/tmp/file.one' ],
},
"prog/pwd" : {
None : [ 'pwd' ],
},
"dev/1" : {
None : [ 'ls', '-l', '/' ],
},
"dev/2" : {
None : [ "/bin/echo", "111", "*", "@!@", "222", "@!@", "333" ],
},
"dev/3" : {
None : [ "/bin/sh", '-c', 'var=@!@; echo $var'],
},
"dev/4" : {
None : [ "/bin/bash",
'-c',
'IFS="/" read -r var1 var2 <<< "@!@"; echo "var1=$var1 var2=$var2"'],
},
}