mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-04-05 06:25:18 +00:00
Auto restart executed commands
This commit is contained in:
parent
cf79868ae1
commit
38f73f6018
5 changed files with 117 additions and 131 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -258,9 +259,13 @@ func (s *controlStream) handleRead(r []byte) error {
|
|||
s.serialAndAudioStreamOpened = true
|
||||
statusLog.startPeriodicPrint()
|
||||
|
||||
startCmdIfNeeded()
|
||||
startSerialPortCmdIfNeeded()
|
||||
startRigctldCmdIfNeeded()
|
||||
runCmdRunner.startIfNeeded(runCmd)
|
||||
if enableSerialDevice {
|
||||
serialCmdRunner.startIfNeeded(runCmdOnSerialPortCreated)
|
||||
}
|
||||
if !disableRigctld {
|
||||
rigctldRunner.startIfNeeded(fmt.Sprint("rigctld -m ", rigctldModel, " -r :", serialTCPPort))
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue