mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-26 08:00:55 +00:00
feat: first-commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/global"
|
||||
)
|
||||
|
||||
func StartTTY() {
|
||||
cmd := "gotty"
|
||||
params := []string{"--permit-write", "bash"}
|
||||
go func() {
|
||||
c := exec.Command(cmd, params...)
|
||||
c.Env = append(c.Env, os.Environ()...)
|
||||
c.Stdout = io.Discard
|
||||
c.Stderr = io.Discard
|
||||
if err := c.Run(); err != nil {
|
||||
global.LOG.Error(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
Reference in New Issue
Block a user