mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-23 17:03:17 +08:00
updated ioutil refs and composes
This commit is contained in:
@@ -3,7 +3,6 @@ package logic
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
@@ -89,7 +88,7 @@ func initWireguard(node *models.Node, privkey string, peers []wgtypes.PeerConfig
|
||||
newConf, _ = ncutils.CreateWireGuardConf(node, key.String(), strconv.FormatInt(int64(node.ListenPort), 10), peers)
|
||||
confPath := ncutils.GetNetclientPathSpecific() + ifacename + ".conf"
|
||||
logger.Log(1, "writing wg conf file to:", confPath)
|
||||
err = ioutil.WriteFile(confPath, []byte(newConf), 0644)
|
||||
err = os.WriteFile(confPath, []byte(newConf), 0644)
|
||||
if err != nil {
|
||||
logger.Log(1, "error writing wg conf file to", confPath, ":", err.Error())
|
||||
return err
|
||||
@@ -97,7 +96,7 @@ func initWireguard(node *models.Node, privkey string, peers []wgtypes.PeerConfig
|
||||
if ncutils.IsWindows() {
|
||||
wgConfPath := ncutils.GetWGPathSpecific() + ifacename + ".conf"
|
||||
logger.Log(1, "writing wg conf file to:", confPath)
|
||||
err = ioutil.WriteFile(wgConfPath, []byte(newConf), 0644)
|
||||
err = os.WriteFile(wgConfPath, []byte(newConf), 0644)
|
||||
if err != nil {
|
||||
logger.Log(1, "error writing wg conf file to", wgConfPath, ":", err.Error())
|
||||
return err
|
||||
|
Reference in New Issue
Block a user