mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
incus-agent: Set base directory
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
@@ -44,10 +44,11 @@ var (
|
||||
osMetricsExcludeMountpoints = regexp.MustCompile(`^/(?:dev|proc|sys|var/lib/docker/.+)(?:$|/)`)
|
||||
osMetricsExcludeFilesystems = []string{"autofs", "binfmt_misc", "bpf", "cgroup", "cgroup2", "configfs", "debugfs", "devpts", "devtmpfs", "fusectl", "hugetlbfs", "iso9660", "mqueue", "nsfs", "overlay", "proc", "procfs", "pstore", "rpc_pipefs", "securityfs", "selinuxfs", "squashfs", "sysfs", "tracefs"}
|
||||
|
||||
osShutdownSignal = unix.SIGTERM
|
||||
osExitStatus = linux.ExitStatus
|
||||
osExecWrapper = linux.NewExecWrapper
|
||||
osMetricsSupported = true
|
||||
osShutdownSignal = unix.SIGTERM
|
||||
osExitStatus = linux.ExitStatus
|
||||
osExecWrapper = linux.NewExecWrapper
|
||||
osBaseWorkingDirectory = "/"
|
||||
osMetricsSupported = true
|
||||
)
|
||||
|
||||
func osGetEnvironment() (*api.ServerEnvironment, error) {
|
||||
|
||||
@@ -65,7 +65,7 @@ func (r *sftpServe) Render(w http.ResponseWriter) error {
|
||||
}
|
||||
|
||||
// Start sftp server.
|
||||
server, err := sftp.NewServer(conn, sftp.WithAllocator())
|
||||
server, err := sftp.NewServer(conn, sftp.WithAllocator(), sftp.WithServerWorkingDirectory(osBaseWorkingDirectory))
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user