mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02: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:
@@ -177,8 +177,8 @@ func LeaseFileDir() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func checkUSG() bool {
|
func checkUSG() bool {
|
||||||
out, _ := exec.Command("mca-cli-op", "info").Output()
|
out, _ := os.ReadFile("/etc/version")
|
||||||
return bytes.Contains(out, []byte("UniFi-Gateway-"))
|
return bytes.HasPrefix(out, []byte("UniFiSecurityGateway."))
|
||||||
}
|
}
|
||||||
|
|
||||||
func restartDNSMasq() error {
|
func restartDNSMasq() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user