update enviroment variable

This commit is contained in:
RomikB
2024-05-07 09:41:51 +02:00
parent 4b1ee1cb5d
commit 3d984f83f9
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ func runScriptCommand(command, interfaceName string) error {
}
process, err := os.StartProcess(comspec, nil /* CmdLine below */, &os.ProcAttr{
Files: []*os.File{devNull, writer, writer},
Env: append(os.Environ(), "WIREGUARD_TUNNEL_NAME="+interfaceName),
Env: append(os.Environ(), "AMNEZIAWG_TUNNEL_NAME="+interfaceName),
Sys: &syscall.SysProcAttr{
HideWindow: true,
CmdLine: fmt.Sprintf("cmd /c %s", command),

View File

@@ -47,7 +47,7 @@ func runScriptCommand(command, interfaceName string) error {
}
process, err := os.StartProcess(comspec, nil /* CmdLine below */, &os.ProcAttr{
Files: []*os.File{devNull, writer, writer},
Env: append(os.Environ(), "WIREGUARD_TUNNEL_NAME="+interfaceName),
Env: append(os.Environ(), "AMNEZIAWG_TUNNEL_NAME="+interfaceName),
Sys: &syscall.SysProcAttr{
HideWindow: true,
CmdLine: fmt.Sprintf("cmd /c %s", command),