diff --git a/netclient/daemon/common.go b/netclient/daemon/common.go index 18a26747..6035fbb0 100644 --- a/netclient/daemon/common.go +++ b/netclient/daemon/common.go @@ -14,10 +14,6 @@ import ( // InstallDaemon - Calls the correct function to install the netclient as a daemon service on the given operating system. func InstallDaemon() error { - if ncutils.CheckIfDaemonExists() { - return nil - } - os := runtime.GOOS var err error diff --git a/netclient/ncutils/netclientutils.go b/netclient/ncutils/netclientutils.go index 3d0deea1..cbe39a00 100644 --- a/netclient/ncutils/netclientutils.go +++ b/netclient/ncutils/netclientutils.go @@ -17,7 +17,6 @@ import ( "runtime" "strconv" "strings" - "syscall" "time" "github.com/c-robinson/iplib" @@ -593,24 +592,3 @@ func ModPort(node *models.Node) error { } return err } - -// CheckIfDaemonExists - checks if netclient daemon is up and running -func CheckIfDaemonExists() bool { - daemonExists := false - pid, err := ReadPID() - if err != nil { - logger.Log(1, "failed to get netclient PID: ", err.Error()) - return daemonExists - } - process, err := os.FindProcess(pid) - if err != nil { - fmt.Printf("Failed to find process: %s\n", err) - return daemonExists - } - err = process.Signal(syscall.Signal(0)) - if err == nil { - daemonExists = true - } - - return daemonExists -}