执行uname和systemctl时增加命令完整路径

This commit is contained in:
GoEdgeLab
2022-09-30 09:40:38 +08:00
parent 0abc99e9f2
commit 5c9146262a
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ func (this *BaseInstaller) LookupLatestInstaller(filePrefix string) (string, err
// InstallHelper 上传安装助手
func (this *BaseInstaller) InstallHelper(targetDir string, role nodeconfigs.NodeRole) (env *Env, err error) {
uname, _, err := this.client.Exec("uname -a")
uname, _, err := this.client.Exec("/usr/bin/uname -a")
if err != nil {
return env, err
}

View File

@@ -366,7 +366,7 @@ func (this *NodeQueue) StopNode(nodeId int64) error {
}
// 我们先尝试Systemd停止
_, _, _ = installer.client.Exec("systemctl stop edge-node")
_, _, _ = installer.client.Exec("/usr/bin/systemctl stop edge-node")
// 执行stop
_, stderr, err := installer.client.Exec(exe + " stop")