Commit 9894d4203bc52b4bb62196906efa1f2ec90fe330
1 parent
bcb1b0e082
Exists in
master
modems
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
bin/smsd-config-generator.js
... | ... | @@ -2,16 +2,19 @@ |
2 | 2 | const config = require('../config'); |
3 | 3 | |
4 | 4 | const result = []; |
5 | +let i = 0; | |
5 | 6 | (config.modems || []).forEach((modem) => { |
6 | 7 | const isOutgoing = config.outgoing_modems && (config.outgoing_modems.indexOf(modem) >= 0) ? 'yes' : 'no'; |
7 | 8 | |
8 | 9 | const content = ` |
9 | -[${modem}] | |
10 | +[GSM${i}] | |
10 | 11 | device = /dev/tty${modem} |
11 | 12 | incoming = yes |
12 | 13 | outgoing = ${isOutgoing} |
13 | 14 | `.trim(); |
14 | 15 | |
16 | + i += 1; | |
17 | + | |
15 | 18 | result.push(content); |
16 | 19 | }); |
17 | 20 |