mirror of
https://github.com/h44z/wg-portal.git
synced 2025-12-14 18:46:17 +00:00
cleanup code warnings, update RaspberryPi readme
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"syscall"
|
||||
"time"
|
||||
@@ -224,7 +224,7 @@ func (s *Server) WriteWireGuardConfigFile(device string) error {
|
||||
return errors.WithMessage(err, "failed to get config file")
|
||||
}
|
||||
filePath := path.Join(s.config.WG.ConfigDirectoryPath, dev.DeviceName+".conf")
|
||||
if err := ioutil.WriteFile(filePath, cfg, 0644); err != nil {
|
||||
if err := os.WriteFile(filePath, cfg, 0644); err != nil {
|
||||
return errors.Wrap(err, "failed to write WireGuard config file")
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user