mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
all: add support to Netgear Orbi Voxel
While at it, also ensure checking the service is installed or not before executing uninstall function, so we won't emit un-necessary errors.
This commit is contained in:
committed by
Cuong Manh Le
parent
b50cccac85
commit
20f8f22bae
@@ -1783,6 +1783,10 @@ func readConfigWithNotice(writeDefaultConfig, notice bool) {
|
||||
}
|
||||
|
||||
func uninstall(p *prog, s service.Service) {
|
||||
if _, err := s.Status(); err != nil && errors.Is(err, service.ErrNotInstalled) {
|
||||
mainLog.Load().Error().Msg(err.Error())
|
||||
return
|
||||
}
|
||||
tasks := []task{
|
||||
{s.Stop, false},
|
||||
{s.Uninstall, true},
|
||||
@@ -2233,7 +2237,6 @@ func newSocketControlClient(s service.Service, dir string) *controlClient {
|
||||
for {
|
||||
curStatus, err := s.Status()
|
||||
if err != nil {
|
||||
mainLog.Load().Warn().Err(err).Msg("could not get service status while doing self-check")
|
||||
return nil
|
||||
}
|
||||
if curStatus != service.StatusRunning {
|
||||
|
||||
Reference in New Issue
Block a user