Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei0465 committed Apr 16, 2023
1 parent 0f28d10 commit 1e3cc52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
11 changes: 0 additions & 11 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ type RemoteQueryConfiguration struct {
// should be resolved on the Panel, and not something that should be resolved by upping this
// number.
Timeout int `default:"30" yaml:"timeout"`

// The number of servers to load in a single request to the Panel API when booting the
// Wings instance. A single request is initially made to the Panel to get this number
// of servers, and then the pagination status is checked and additional requests are
// fired off in parallel to request the remaining pages.
//
// It is not recommended to change this from the default as you will likely encounter
// memory limits on your Panel instance. In the grand scheme of things 4 requests for
// 50 servers is likely just as quick as two for 100 or one for 400, and will certainly
// be less likely to cause performance issues on the Panel.
BootServersPerPage int `default:"50" yaml:"boot_servers_per_page"`
}

type SystemConfiguration struct {
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (
func initLogging() {
dir := config.Get().System.LogDirectory
p := filepath.Join(dir, "/sftp-server.log")
if err := os.MkdirAll(filepath.Dir(p), 0o755); err != nil {
log2.Fatalf("sftp: could not create internal sftp server log directory: %s", err)
}
w, err := logrotate.NewFile(p)
if err != nil {
log2.Fatalf("failed to create server log: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion sftp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (c *SFTPServer) Run() error {
Extensions: map[string]string{
"ip": conn.RemoteAddr().String(),
"uuid": os.Getenv("P_SERVER_UUID"),
"user": "test",
"user": "admin",
"permissions": "*,admin.websocket.errors,admin.websocket.install,admin.websocket.transfer",
},
}, nil
Expand Down

0 comments on commit 1e3cc52

Please # to comment.