mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
执行uname和systemctl时增加命令完整路径
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user