mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
internal/router/edgeos: use /etc/version for checking USG
Since mca-cli-op may not be available during boot time.
This commit is contained in:
committed by
Cuong Manh Le
parent
126477ef88
commit
6028b8f186
@@ -177,8 +177,8 @@ func LeaseFileDir() string {
|
||||
}
|
||||
|
||||
func checkUSG() bool {
|
||||
out, _ := exec.Command("mca-cli-op", "info").Output()
|
||||
return bytes.Contains(out, []byte("UniFi-Gateway-"))
|
||||
out, _ := os.ReadFile("/etc/version")
|
||||
return bytes.HasPrefix(out, []byte("UniFiSecurityGateway."))
|
||||
}
|
||||
|
||||
func restartDNSMasq() error {
|
||||
|
||||
Reference in New Issue
Block a user