Built motion from commit 67e5df37.|2.0.66
[motion2.git] / server / files / templates / trunk.ejs
1 <% trunks.forEach(function(trunk) { -%>
2 <% if (trunk.active) { -%>
3 [<%- trunk.name %>]
4 <% for (var key in trunk) { -%>
5 <% if (trunk[key]) { -%>
6 <% switch(key) {
7 case 'allow': -%>
8 <% trunk[key].split(';').forEach(function(codec) { -%>
9 allow=<%- codec %>
10 <% }); -%>
11 <% break; -%>
12 <% case 'id':
13 case 'active':
14 case 'createdAt':
15 case 'updatedAt':
16 case 'registry':
17 case 'status':
18 case 'otherFields':
19 break; -%>
20 <% default: -%>
21 <%- key %>=<%- trunk[key] %>
22 <% } -%>
23 <% } -%>
24 <% } -%>
25 <% if (trunk.encryption == 'yes') { -%>
26 avpf=yes
27 dtlsenable=yes
28 dtlsverify=no
29 dtlscertfile=/etc/pki/tls/certs/motion.crt
30 dtlskeyfile=/etc/pki/tls/private/motion.key
31 dtlssetup=actpass
32 dtlsrekey=0
33 <% } -%>
34 <% if (trunk.otherFields) { -%>
35 <%- trunk.otherFields %>
36 <% } -%>
37 <% } -%>
38
39 <% }); %>