mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
custom actions: add env vars
action parameters can now be readed from env vars too. Added a timeout for the command execution
This commit is contained in:
@@ -384,7 +384,14 @@ func (c *sshCommand) sendExitStatus(err error) {
|
||||
metrics.SSHCommandCompleted(err)
|
||||
// for scp we notify single uploads/downloads
|
||||
if err == nil && c.command != "scp" {
|
||||
go executeAction(operationSSHCmd, c.connection.User.Username, c.getDestPath(), "", c.command)
|
||||
realPath := c.getDestPath()
|
||||
if len(realPath) > 0 {
|
||||
p, err := c.connection.buildPath(realPath)
|
||||
if err == nil {
|
||||
realPath = p
|
||||
}
|
||||
}
|
||||
go executeAction(operationSSHCmd, c.connection.User.Username, realPath, "", c.command, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user