Update line_connection.ts
This commit is contained in:
parent
d2621ca86c
commit
07cfde8c15
|
|
@ -1065,6 +1065,7 @@ export default class LineConnection {
|
|||
const station = await Station.find(this.config.stationId)
|
||||
if (!station) return
|
||||
const network = station?.gateway || '172.25.1.1'
|
||||
const tftpIp = station?.tftp_ip || '172.16.7.69'
|
||||
const [a, b] = network.split('.').map(Number)
|
||||
const timeZone = process.env.TIME_ZONE || 'Australia/Sydney'
|
||||
const startTime = momentTZ().tz(timeZone).format('YYYY/MM/DD, HH:mm:ss')
|
||||
|
|
@ -1092,7 +1093,7 @@ export default class LineConnection {
|
|||
},
|
||||
{
|
||||
expect: 'rommon',
|
||||
send: `TFTP_SERVER=${station?.tftp_ip || '172.16.7.69'}`,
|
||||
send: `TFTP_SERVER=${tftpIp}`,
|
||||
delay: '1',
|
||||
repeat: '1',
|
||||
note: '',
|
||||
|
|
@ -1199,7 +1200,7 @@ export default class LineConnection {
|
|||
timeout: 1000,
|
||||
body: JSON.stringify(body),
|
||||
}
|
||||
|
||||
await sleep(5000)
|
||||
await this.runScript(script as any, userName)
|
||||
await this.endEmailLoadIos(nameIos, startTime)
|
||||
}
|
||||
|
|
@ -1208,6 +1209,7 @@ export default class LineConnection {
|
|||
const station = await Station.find(this.config.stationId)
|
||||
if (!station) return
|
||||
const network = station?.gateway || '172.25.1.1'
|
||||
const tftpIp = station?.tftp_ip || '172.16.7.69'
|
||||
const [a, b] = network.split('.').map(Number)
|
||||
const timeZone = process.env.TIME_ZONE || 'Australia/Sydney'
|
||||
const startTime = momentTZ().tz(timeZone).format('YYYY/MM/DD, HH:mm:ss')
|
||||
|
|
@ -1291,7 +1293,7 @@ export default class LineConnection {
|
|||
},
|
||||
{
|
||||
expect: '',
|
||||
send: `${station?.tftp_ip || '172.16.7.69'}`,
|
||||
send: `${tftpIp}`,
|
||||
delay: '1',
|
||||
repeat: '1',
|
||||
note: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue